|
![](/i/fill.gif) |
"Orchid XP v2" <voi### [at] dev null> wrote in message
news:44140c0e$1@news.povray.org...
> Arrrrghhh!! >_<
>
> It so *nearly* works it's driving me insane... It *almost* works, but it's
> still broken!
>
Hi again,
Define 'works'. ;-)
You are passing a set of points and a set of references to those points to
your routine (Similar to the way VRML defines shapes - maybe a coincidence).
Can I assume you were intending to get a closed 3D shape out of this?
If I understand your SDL and your intentions correctly you are happy with
the edges, but you are not happy with the left-most surface when you set the
first point to <-2,-1,-1>, because 3 of the points of the surface touch the
corner points of the shape, but the fourth point (in this case the point
with index 2, which is the 3rd one in your list) doesn't.
For each face, your SDL uses 2D components of 4 points to generate a flat
prism object that lies parallel to the XZ plane, then you re-orient it based
upon vectors defined using only the first 3 of the 4 points. Because the
fourth point 3D that you pass into the routine doesn't lie on the same plane
as the first 3 3D points you pass into the routine, your surface ends up
sticking up in the air and doesn't stand a chance of touching the fourth
point.
To move forward you will need to decide what sort of shape you would expect
to generate for 4 points that don't lie in the same plane and generate that
shape instead of the prism object (maybe a mesh or mesh2 object). Otherwise
you may just wish to adjust your points so that each set of 4 points lies on
a plane.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |