POV-Ray : Newsgroups : povray.newusers : Add leaf on my tree : Re: Add leaf on my tree Server Time
30 Jul 2024 02:19:56 EDT (-0400)
  Re: Add leaf on my tree  
From: Tor Olav Kristensen
Date: 28 Oct 2004 10:05:18
Message: <4180fc9e$1@news.povray.org>
sap wrote:
> Thanks for your answer Tor, i use vrotate ans Vangle to attache my cylinder 
> at they extremity. When i use VDangle, cylinders are not attached.

They are not really attached when using Vangle() either.

Just look closely at the first branch. (Btw.: I suggest
that you add at least one texture to your trees first.)

The "misuse" of VAngle() just results in smaller angles
when radians are interpreted as degrees. This causes
the disattachments(?) to be less visible.

To see this, just try to increase the rotation angles
by scaling them a little:

   #local ang = VAngle(p0, p1)*4;

Also try:

   #local ang = VAngle(p0, p1)*0;

- which will attach them to each other again.

This means that the rotation of p1 does not make much
sense the way it is done now.


> Then i 
> dont rotate my cylinder but i take the point Np0 and add it a random vector 
> in the +y direction to make my tree grow.
> 
> Its my firt macro in that way and i am now blocked because i cant translate 
> and rotate an object along and around cylinders.
> 
> My way to place cylinders is certenly the most rational way but it's the 
> onely one i found.

But it seems that you misunderstand something...

I'm not sure what you want to achieve with the rotation
vector above, so I'm not able to guess what your mis-
conseption might be...

Could it be that rotation of objects is not performed
"locally", but "globally" ?

(I.e. not about the axes "local" to objects but about
"global" axes through origo <0, 0, 0>)

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

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