![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In POV-Ray, you are allowed to input 3 coordinates when using the triangle
function. Thus, the triangle can be rotated and placed in any three
dimensional plane without using the rotate function.
Can you do the same to a polygon so that it lies in any plane you choose. I
have tried doing this without success so far. I understand that all the
points would need to fall on that plane.
Thanks for the help.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Maybe I should have explained better:
I am trying to create shapes in a 3D plane without using triangles, i.e. its
a lot easier to program 1 pentagon than 5 triangles.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Correct me if I am wrong, but I think the triangle and the plane are the
only 2D shapes that can be rendered by POV, regardless of orientation.
Perhaps you could use CSG to hack interesting shapes out of a plane (I don't
know if this is possible)... but I think my brain would overload if I tried
this in arbitrary 3-space. Might be better to carve the plane while it is
lying flat and then move it into place.
In the specific example you describe I would build the pentagon out of
triangles and encode everything in a macro to minimize the impact on my
other code. You might choose to pass the centre, normal, and radius to the
macro to provide one-stop shopping.
"Snowman" <sno### [at] somewhere com> wrote in message
news:3aac145c$1@news.povray.org...
> Maybe I should have explained better:
> I am trying to create shapes in a 3D plane without using triangles, i.e.
its
> a lot easier to program 1 pentagon than 5 triangles.
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3aac18cb@news.povray.org>, "Spock" <spo### [at] nospam com>
wrote:
> Correct me if I am wrong, but I think the triangle and the plane are the
> only 2D shapes that can be rendered by POV, regardless of orientation.
You're wrong...the 2D surfaces POV supports are triangles (including
smooth_triangles), discs, and polygons. It also has bicubic_patches, but
even though they are infinitely thin, they are curved in 3 dimensions,
not restricted to a 2D plane.
Plane objects are not 2D, but infinite 3D surfaces. They divide the
"universe" into 2 halves, one is "inside" the plane.
> Perhaps you could use CSG to hack interesting shapes out of a plane
> (I don't know if this is possible)... but I think my brain would
> overload if I tried this in arbitrary 3-space. Might be better to
> carve the plane while it is lying flat and then move it into place.
Not with CSG (unless you wanted a polygon with thickness), but you could
try using clipped_by to do it.
> In the specific example you describe I would build the pentagon out
> of triangles and encode everything in a macro to minimize the impact
> on my other code. You might choose to pass the centre, normal, and
> radius to the macro to provide one-stop shopping.
This would probably be the easiest way to do it.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Snowman <sno### [at] somewhere com> wrote:
: I am trying to create shapes in a 3D plane without using triangles, i.e. its
: a lot easier to program 1 pentagon than 5 triangles.
You'll probably get a performance boost by using triangle meshes instead
of polygons anyways, so don't be so scared of using triangles to form
more complex polygons (although I'm not sure how povray handles polygons).
As someone already suggested, making helping macros is a good idea.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Snowman wrote:
>
> In POV-Ray, you are allowed to input 3 coordinates when using the triangle
> function. Thus, the triangle can be rotated and placed in any three
> dimensional plane without using the rotate function.
> Can you do the same to a polygon so that it lies in any plane you
> choose. I have tried doing this without success so far. I understand
> that all the points would need to fall on that plane.
They need to fall *exactly* in the plane. My experience is that the
slightest round-off error can throw points out of the plane, and this
will cause POV-Ray to reject the polygon.
A better approach is to declare the vertices in the 2d coordinate
plane of your choice (x-y, x-z, or y-z), and then use a transform to
place it.
Triangles will work better, though.
Regards,
John
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Snowman wrote:
>
> Maybe I should have explained better:
> I am trying to create shapes in a 3D plane without using triangles, i.e. its
> a lot easier to program 1 pentagon than 5 triangles.
You only need 3 triangles to make a pentagon, not 5!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |