|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi all. Can someone help me understand why my translated and rotated
grass would suddenly become airborne? According to the Pov code, there
is no transformation on the y-axis, and I don't ever rotate it upwards
or downwards, either. Attached is the picture and below is the
pertinent code for the grass circle.
#declare Rad=10;
#declare R_V=0;
#declare R3 = seed (27143);
#declare R4 = seed (R3);
#declare Offset1=-67+rand(R2)*6.357;
#while(Rad > 0)
#local R_V = 0;
#while(R_V<360)
object{ Blade
translate rand(R4)*1.5+z*Rad
rotate y*R_V
}
#local R_V = R_V+300/Rad/10;
#end
#local Rad = Rad - 0.5;
#end
Post a reply to this message
Attachments:
Download 'gardenborder.jpg' (51 KB)
Preview of image 'gardenborder.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
3F1553EE.ED12B0C7@duratechindustries.net...
> Hi all. Can someone help me understand why my translated and rotated
> grass would suddenly become airborne?
In the following line
> translate rand(R4)*1.5+z*Rad
rand(R4)*1.5 is actually promoted to rand(R4)*1.5*<1,1,1>
so that you have a random <x,y,z> movement
To get it right it should be for instance <rand(R4),0,rand(R4)>
G.
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 16 Jul 2003 08:32:30 -0500, Ghost <flu### [at] duratechindustriesnet> wrote:
> translate rand(R4)*1.5+z*Rad
this line means in fact
#local temp=rand(R4);
translate <temp,temp,temp>*1.5+z*Rad
which means
#local temp=rand(R4);
translate <temp*1.5,temp*1.5,temp*1.5+Rad>*1.5
so as you seen there is translation along y axis.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ghost wrote:
>Hi all. Can someone help me understand why my translated and rotated
>grass would suddenly become airborne? According to the Pov code, there
>is no transformation on the y-axis, and I don't ever rotate it upwards
>or downwards, either. Attached is the picture and below is the
>pertinent code for the grass circle.
Actually, you are translating the grass in the y-direction, right here:
> object{ Blade
> translate rand(R4)*1.5+z*Rad
> rotate y*R_V
> }
the statement:
translate rand(R4)*1.5+z*Rad
will be promoted to:
translate <rand(R4)*1.5, rand(R4)*1.5, rand(R4)*1.5+Rad>
with the rand statements all being equal. You need to explicitly set the
direction that you want this translation to occur. Hope that helps!
- Nick (FitchN.com)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ack... now I see what I did. I guess it never occurred to me that this would
happen. Oh well, now I know! Thanks guys!
Ghost wrote:
> Hi all. Can someone help me understand why my translated and rotated
> grass would suddenly become airborne? According to the Pov code, there
> is no transformation on the y-axis, and I don't ever rotate it upwards
> or downwards, either. Attached is the picture and below is the
> pertinent code for the grass circle.
>
> #declare Rad=10;
> #declare R_V=0;
> #declare R3 = seed (27143);
> #declare R4 = seed (R3);
> #declare Offset1=-67+rand(R2)*6.357;
>
> #while(Rad > 0)
> #local R_V = 0;
> #while(R_V<360)
> object{ Blade
> translate rand(R4)*1.5+z*Rad
> rotate y*R_V
> }
> #local R_V = R_V+300/Rad/10;
> #end
> #local Rad = Rad - 0.5;
> #end
>
> ------------------------------------------------------------------------
> [Image]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |