POV-Ray : Newsgroups : povray.newusers : Newbie syntax problem Server Time
25 Dec 2024 01:24:38 EST (-0500)
  Newbie syntax problem (Message 1 to 10 of 23)  
Goto Latest 10 Messages Next 10 Messages >>>
From: LibraryMan
Subject: Newbie syntax problem
Date: 11 Nov 2002 09:57:36
Message: <3DCFC48B.4893CC95@att.net>
Hi,
I'm trying to do a prism with a dodecagon (? -- anyway, polygon with 12
equal sides ) face and instead of trying to figure out the exact vectors
of the points, I wanted to do something like specifying every 4th
vector, then rotating the in-betweens around the y-axis, like this:

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


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, , v_03, v_04, v_05, v_06, v_07, v_08, v_09, v_10, v_11, v_12, v_1
pigment { Green }
}


Of course I'm getting errors, else I wouldn't be posting, but I'm sure
the basic concept I'm thinking of is 'do-able' but what am I missing?

Thanks!
"LibraryMan"


Post a reply to this message

From: hughes, b 
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 10:46:38
Message: <3dcfd0de@news.povray.org>
"LibraryMan" <mrm### [at] attnet> wrote in message
news:3DCFC48B.4893CC95@att.net...
> I'm trying to do a prism with a dodecagon (? -- anyway, polygon with 12
> equal sides ) face and instead of trying to figure out the exact vectors
> of the points, I wanted to do something like specifying every 4th
> vector, then rotating the in-betweens around the y-axis, like this:
>
> #declare v_01 =  <0.5, 0> ;
> #declare v_02 =  <0.5, 0> rotate y*30 ;

A prism for a dodecahedron? Not sure you could ever get that shape from a
single prism object.  Anyway, your syntax trouble is with the rotates. Can't
declare those in along with a vector.

There's a predefined Dodecahedron in Shapes2.inc which is made of rotated
intersecting planes.

P.S.

This brings up something I almost forgot about, Dave Dunn had noticed the
Shapes2.inc doesn't call for Shapes_old.inc so that a Cone_Y can be used in
the HalfCone_Y object. And the Shapes2.inc file is not included into
Shapes.inc although Shapes_old.inc is. To correct matters you need to add it
to Shapes.inc like this:

#include "shapes_old.inc"  // this is already there
#include "shapes2.inc"  // this line needed after the old shapes file


Post a reply to this message

From: Christoph Hormann
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 10:57:35
Message: <3DCFD36D.3205E08D@gmx.de>
LibraryMan wrote:
> 
> Hi,
> I'm trying to do a prism with a dodecagon (? -- anyway, polygon with 12
> equal sides ) face and instead of trying to figure out the exact vectors
> of the points, I wanted to do something like specifying every 4th
> vector, then rotating the in-betweens around the y-axis, like this:
> 
> #declare v_01 =  <0.5, 0> ;
> #declare v_02 =  <0.5, 0> rotate y*30 ;
> [...]

Bob's suggestion is surely the best for your purpose but
rotating/transforming vectors can be done with
'vrotate()'/'vtransform()'.    See the documentation for details.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 11:51:09
Message: <3dcfdffc@news.povray.org>
hughes, b. wrote:

> A prism for a dodecahedron? 

I think he meant a (extruded) regular 12-sided polygon. Don't know if it 
has an "official" name, but his guess, "dodecagon", sounds logical to me...


Post a reply to this message

From: LibraryMan
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 12:40:06
Message: <3DCFEA8E.4994C2E@att.net>
Correct, that is what I meant. :-)  "Dodeca-" I took to mean the prefix
for twelve, and "gon" I thought would be the suffix for a multi-sided
geometric shape.
-MW

Johannes Dahlstrom wrote:
> 
> hughes, b. wrote:
> 
> > A prism for a dodecahedron?
> 
> I think he meant a (extruded) regular 12-sided polygon. Don't know if it
> has an "official" name, but his guess, "dodecagon", sounds logical to me...


Post a reply to this message

From: LibraryMan
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 12:46:31
Message: <3DCFEC0E.9C09C925@att.net>
The number of sides to the extruded shape is not as much the matter as
is the question of how to rotate vectors of a given distance from the
origin (in XZ plane) around the y-axis.  Looks like this 'vrotate' is
worth a look.  Let me go study some...  Unless of course one of you
decides to GIVE me the answer... ;-)

--LibraryMan

Christoph Hormann wrote:
> 
> LibraryMan wrote:
> >
> > Hi,
> > I'm trying to do a prism with a dodecagon (? -- anyway, polygon with 12
> > equal sides ) face and instead of trying to figure out the exact vectors
> > of the points, I wanted to do something like specifying every 4th
> > vector, then rotating the in-betweens around the y-axis, like this:
> >
> > #declare v_01 =  <0.5, 0> ;
> > #declare v_02 =  <0.5, 0> rotate y*30 ;
> > [...]
> 
> Bob's suggestion is surely the best for your purpose but
> rotating/transforming vectors can be done with
> 'vrotate()'/'vtransform()'.    See the documentation for details.
> 
> Christoph
> 
> --
> POV-Ray tutorials, include files, Sim-POV,
> HCR-Edit and more: http://www.tu-bs.de/~y0013390/
> Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: hughes, b 
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 14:43:02
Message: <3dd00846@news.povray.org>
"LibraryMan" <mrm### [at] attnet> wrote in message
news:3DCFEC0E.9C09C925@att.net...
> The number of sides to the extruded shape is not as much the matter as
> is the question of how to rotate vectors of a given distance from the
> origin (in XZ plane) around the y-axis.  Looks like this 'vrotate' is
> worth a look.  Let me go study some...  Unless of course one of you
> decides to GIVE me the answer... ;-)

I don't think anything written up for POV so far does something with the uv
kind of vectors such as prism uses. Checking out vrotate for that here got
me nowhere even though I tried to use the dot operator in an attempt to
limit the usual 3 float vectors to two floats but POV will not allow it into
the prism.

I had a feeling you knew a prism wasn't going to do a dodecahedron but I
didn't catch on about the dodecagon name and jumped ahead that you were
confused about the prism. My fault, sorry.

If anyone tells of a way to work with the uv vector, as described above, I'm
all ears too.


Post a reply to this message

From: LibraryMan
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 16:37:19
Message: <3DD0220B.1B5F76C3@att.net>
BTW, what are uv vectors (RANK newbie here!)

Wow, it's hard to believe something simple enough for _ME_ to come up
with it isn't actually possible 
to do!!  I mean, in principle it ought to work, right?  POV's SDL can do
so many other things (that I sure DON'T understand! ;-)  )

I was allowed to declare the following vectors, no problem, :
#declare v_01 =  <0.5, 0, 0>;
#declare v_02 =  vrotate(<0.5, 0, 0>,y*30);
#declare v_03 =  vrotate(<0.5, 0, 0>,y*60);
#declare v_04 =  <0, 0, -0.5>;
#declare v_05 =  vrotate(<0, 0, -0.5>,y*30);
#declare v_06 =  vrotate (<0, 0, -0.5>,y*60);
#declare v_07 =  <-0.5, 0, 0>;
#declare v_08 =  vrotate(<-0.5, 0, 0>,y*30);
#declare v_09 =  vrotate(<-0.5, 0, 0>,y*60);
#declare v_10 =  <0, 0, 0.5>;
#declare v_11 =  vrotate(<0, 0, 0.5>,y*30);
#declare v_12 =  vrotate(<0, 0, 0.5>,y*60);

But when it came to actually using them in the prism, like so:

prism {
linear_sweep
linear_spline
0,
1,
13,
v_01, v_02, v_03, v_04, v_05, v_06, v_07, v_08, v_09, v_10, v_11, v_12,
v_01
pigment { Green }
}

POV choked on it!  AARRGGGH!  It's SO simple!  Why isn't it possible?!
--Mark


"hughes, b." wrote:
>
> I don't think anything written up for POV so far does something with the uv
> kind of vectors such as prism uses. Checking out vrotate for that here got
> me nowhere even though I tried to use the dot operator in an attempt to
> limit the usual 3 float vectors to two floats but POV will not allow it into
> the prism.
> 
> I had a feeling you knew a prism wasn't going to do a dodecahedron but I
> didn't catch on about the dodecagon name and jumped ahead that you were
> confused about the prism. My fault, sorry.
> 
> If anyone tells of a way to work with the uv vector, as described above, I'm
> all ears too.


Post a reply to this message

From: LibraryMan
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 17:02:34
Message: <3DD027F1.3310AA64@att.net>
I quote from section 4.1.4 of the manual for POV v3.1g:  
"A vector is a set of related float values. Vectors may be specified
using literals, identifiers or functions which return vector values. You
may also create very complex vector
expressions from combinations of any of these using various familiar
operators."

I _SHOULD_ be able to use the identifiers as vectors in the prism
statement, shouldn't I?  If not, the above is a LIE!

Anyone?  (Bueller?...)
--Mark

"hughes, b." wrote:
> 
> "LibraryMan" <mrm### [at] attnet> wrote in message
> news:3DCFEC0E.9C09C925@att.net...
> > The number of sides to the extruded shape is not as much the matter as
> > is the question of how to rotate vectors of a given distance from the
> > origin (in XZ plane) around the y-axis.  Looks like this 'vrotate' is
> > worth a look.  Let me go study some...  Unless of course one of you
> > decides to GIVE me the answer... ;-)
> 
> I don't think anything written up for POV so far does something with the uv
> kind of vectors such as prism uses. Checking out vrotate for that here got
> me nowhere even though I tried to use the dot operator in an attempt to
> limit the usual 3 float vectors to two floats but POV will not allow it into
> the prism.
> 
> I had a feeling you knew a prism wasn't going to do a dodecahedron but I
> didn't catch on about the dodecagon name and jumped ahead that you were
> confused about the prism. My fault, sorry.
> 
> If anyone tells of a way to work with the uv vector, as described above, I'm
> all ears too.


Post a reply to this message

From: LibraryMan
Subject: Re: Newbie syntax problem
Date: 11 Nov 2002 17:07:16
Message: <3DD02908.9709E1E6@att.net>
LibraryMan wrote:
> 
> I quote from section 4.1.4 of the manual for POV v3.1g:

This corresponds to section 6.1.4 of the POV 3.5 help (for Win).


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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