POV-Ray : Newsgroups : povray.newusers : Newbie syntax problem : Re: Newbie syntax problem Server Time
4 Sep 2024 22:15:29 EDT (-0400)
  Re: Newbie syntax problem  
From: hughes, b 
Date: 11 Nov 2002 20:29:41
Message: <3dd05985@news.povray.org>
I did get it accepting the 2D vectors, as Chris had shown by forcing them
within the prism. I kept getting a 3D (or 4D or 5D?) when predeclaring even
with dot operators.

No dodecahedron (yet), so I leave that up to you to try and figure out.
Especially since I'm not sure what I'm doing with it. Chris's loop idea
sounds simpler but I couldn't get it to make one by rotating just the x
value, not with the loop he suggested though.

#declare v_01 =  <0.5, 0>;
#declare v_02 =  vrotate(<0.5, 0>,30*y);
#declare v_03 =  vrotate(<0.5, 0>,60*y);
#declare v_04 =  <0, -0.5>;
#declare v_05 =  vrotate(<0, -0.5>,30*y);
#declare v_06 =  vrotate(<0, -0.5>,60*y);
#declare v_07 =  <-0.5, 0>;
#declare v_08 =  vrotate(<-0.5, 0>,30*y);
#declare v_09 =  vrotate(<-0.5, 0>,60*y);
#declare v_10 =  <0, 0.5>;
#declare v_11 =  vrotate(<0, 0.5>,30*y);
#declare v_12 =  vrotate(<0, 0.5>,60*y);

prism {
linear_sweep
linear_spline
0, // sweep the following shape from here ...
1, // ... up through here
13, // the number of points making up the shape ...
<v_01.x,v_01.y>, <v_02.x,v_02.y>, <v_03.x,v_03.y>, <v_04.x,v_04.y>,
<v_05.x,v_05.y>, <v_06.x,v_06.y>, <v_07.x,v_07.y>,
 <v_08.x,v_08.y>, <v_09.x,v_09.y>, <v_10.x,v_10.y>, <v_11.x,v_11.y>,
<v_12.x,v_12.y>, <v_01.x,v_01.y>
pigment { color rgb <0,1,0> }
 rotate -90*x // face camera
}

camera {
 location -4*z
 look_at 0
}

light_source {
 <10,10,-10>,<1,0.5,1>
}
light_source {
 <-10,-10,-10>,<0.5,1,0.5>
}


Post a reply to this message

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