POV-Ray : Newsgroups : povray.advanced-users : Phase 2: cutting a mask of height field style mesh : Re: Phase 2: cutting a mask of height field style mesh Server Time
29 Jul 2024 06:25:04 EDT (-0400)
  Re: Phase 2: cutting a mask of height field style mesh  
From: normdoering
Date: 19 Nov 2002 07:05:05
Message: <web.3dda278e17353994cc8d8d00@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.