add tag
4 years ago Anonymous 1123

In Geospace, I can fill a polyhdron, like this marmot.png

How can I fill it with 3dtools?

Top Answer
4 years ago user 3.14159

If you do not insist on transformed patterns, then everything is already part to the 3dtools library. You just change the fore style for some of the faces.

Screen Shot 2021-04-22 at 11.38.17 AM.png

Obviously you can also use patterns from patterns.meta, say, to shade the faces. What won’t happen there is that the patterns get transformed to the plane. In fact, even though it is straightforward to project pretty much anything on a plane, this is not the case for patterns, which are some low-level directives that directly talk to the driver (which is why, among other things, they may look different on a pdf and a pdf that has been converted to a bitmap, say). You can define (computationally expensive) pattern-like styles and project those. I copied a style from this post and slightly modified it to provide you with an explicit example. This pattern gets projected “obvious” planes like the xy plane from the 3d library but also on a slightly less obvious one.

Screen Shot 2021-04-22 at 1.16.37 PM.png

4 years
Anonymous 1123 — Saturday, 24th Apr 2021 07:48

@marmot, re: your answer, Thanks.

a day
user 3.14159 replying to Anonymous 1123 — Friday, 23rd Apr 2021 07:20

You seem to have nice friends. 😸

Anonymous 1123 — Friday, 23rd Apr 2021 07:14

@marmot, re: your answer, He posted at here

Anonymous 1123 — Friday, 23rd Apr 2021 07:13

@marmot, re: your answer, This is not my code. My friend. How do you think about this code, about patterns?

3 hours
user 3.14159 replying to Anonymous 1948 — Friday, 23rd Apr 2021 03:45

Yes, this is what the whole polyhedron stuff was originally written for.

ani.gif

18 minutes
Anonymous 1948 replying to user 3.14159 — Friday, 23rd Apr 2021 03:27

Can you write a code so that we can see the cube is divided into two parts clealy (one fills and remain does not fill)? With this screen shot, the cube seems does not divide into two parts.

an hour
user 3.14159 replying to Anonymous 1123 — Friday, 23rd Apr 2021 02:35

The library distinguishes between visible and hidden faces. So, if you want to see a plane even if it is to be hidden, all you need to do is also to switch on back.

Screen Shot 2021-04-22 at 6.34.52 PM.png

16 minutes
Anonymous 1123 — Friday, 23rd Apr 2021 02:19

@marmot, re: your answer, First your code seem incorrect with 3d/install view={phi=150,theta=70}

29 minutes
Anonymous 1123 — Friday, 23rd Apr 2021 01:50

@marmot, re: your answer, “planes like the xy plane from the 3d library but also on a slightly less obvious one.” But, I think, It nice.

9 hours
Anonymous 1123 replying to user 3.14159 — Thursday, 22nd Apr 2021 16:57

I use Geospace, I get the result. Really, I do not notice that transforming patterns. First, you can fill it without transforming patterns. I hope that, there is a short key, e.g fill polyhedron with corners = {}

user 3.14159 — Thursday, 22nd Apr 2021 16:53

@Anonymous, re: your question, filling is not so difficult. However, your screen shot shows transformed patterns. Transforming patterns is not easy/possible, at least a lot of efforts. How important is it that these are transformed patterns (rather than just fills or untransformed patterns)?

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.