|
![](/i/fill.gif) |
Dennis Miller wrote:
>Love to see this when it is done.
>Best,
>D.
Thanks. I hope to make it very easy to use and do a lot more.
However, it's probably going to take me awhile if I can't get help here. At
present I am very stumped on the smoothing with normals. Code I am writing
just isn't working. I'll eventually figure it out reading Warp's C code and
playing with copies of the HF_ macros, but my time is limited and I can
only put in a couple hours or less a day... and not every day.
Anybody know how to do that with this kind of irregular mesh2? You can't be
as systematic as in the HF_ macros (I don't think at any rate).
Are there any good tutorials on this out there?
So far I gather I have to use vcross() and vnormalize(), something like
this:
#declare Normz[cnt] = vnormalize
( vcross
( Mary[triang[cnt].y].x - Mary[triang[cnt].x].x, //vector 1
Mary[triang[cnt].y].y - Mary[triang[cnt].x].y,
Mary[triang[cnt].y].z - Mary[triang[cnt].x].z,
Mary[triang[cnt].z].x - Mary[triang[cnt].x].x, //vector 2
Mary[triang[cnt].z].y - Mary[triang[cnt].x].y,
Mary[triang[cnt].z].z - Mary[triang[cnt].x].z
)
);
--normdoering
PS - and why does text disappear when you place it between angle brackets? I
removed them from above code.
Post a reply to this message
|
![](/i/fill.gif) |