POV-Ray : Newsgroups : povray.advanced-users : Random points on surface of an object : Re: Random points on surface of an object Server Time
6 Oct 2024 13:38:15 EDT (-0400)
  Re: Random points on surface of an object  
From: Thomas de Groot
Date: 20 Feb 2007 07:57:57
Message: <45daf055$1@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> schreef in bericht 
news:45dab553$1@news.povray.org...
>
> Trace and the RandOnSurface macro only return a point and a normal.

Exactly.
>
> You could ignore the vertical portion of the normal and force some
> object to be horizontal in respect to the horizon.
> Point_At_Trans(vnormalize(<Norm.x,0,Norm.z>))
> but you would need to decide what to do if the normal is vertical
> or it might error out.

This works as I want it to do!! I shall think about something for those 
cases where Norm.y is vertical (probably just skip it).
Thank you!! A simple solution indeed.
>
> However, I think what you intend is to follow the shape of the object?
> A normal isn't enough to generate info about how the surface
> shape slopes nearby to some random point. You could trace nearby
> points and rotate based on that perhaps.

Not necessarily for my purpose. I want to experiment with a given shape on 
which "leaves" are growing. Basically, the leaves are all oriented 
horizontally and bending slightly down.

Thomas


Post a reply to this message

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