POV-Ray : Newsgroups : povray.general : Variable #points in PRISM Server Time
7 Nov 2024 15:34:13 EST (-0500)
  Variable #points in PRISM (Message 1 to 4 of 4)  
From: BorisW37
Subject: Variable #points in PRISM
Date: 6 Aug 2003 23:00:02
Message: <web.3f31c011572ba8b36af901ee0@news.povray.org>
I am making a macro that would draw Prisms with a variable number (N) of
points (set in macro properties).
Points are going to be generated by a certain formula.
How do i go about descrbibing such a prism?

// extrude a closed 2-D shape along an axis
prism {
  linear_sweep  // or conic_sweep for tapering to a point
  linear_spline // linear_spline | quadratic_spline | cubic_spline |
bezier_spline
  -0.5,         // height 1
   0.5,         // height 2
  N,           // number of points
  // (--- the <u,v> points ---)
<points1>, <point2>, <point3>,.....<pointN>
}


Post a reply to this message

From: ABX
Subject: Re: Variable #points in PRISM
Date: 7 Aug 2003 05:01:35
Message: <m454jvgss3ts3ohbn35la7mc6rkb6btofc@4ax.com>
On Wed,  6 Aug 2003 22:57:21 EDT, "BorisW37" <Bor### [at] yahoocom> wrote:

>I am making a macro that would draw Prisms with a variable number (N) of
>points (set in macro properties).
>Points are going to be generated by a certain formula.
>How do i go about descrbibing such a prism?

#macro Formula(n)
  // calculate n-th point
  <n-th point>
#end

prism {
  linear_sweep
  linear_spline
  -0.5,
   0.5,
  N,
  #local C=0;
  #while(C<N)
    Formula(N)
    #local C=C+1;
  #end
}

ABX


Post a reply to this message

From: BorisW37
Subject: Re: Variable #points in PRISM
Date: 7 Aug 2003 21:10:01
Message: <web.3f32f7a0adb6224f6af901ee0@news.povray.org>
I am trying to use vrotate as a formula to use in prism generation. Is there
anyway i can exclude the Z component and just use x, and y components of
the point, since prism only needs 2 u,v components for each point


Post a reply to this message

From: BorisW37
Subject: Re: Variable #points in PRISM
Date: 7 Aug 2003 21:25:01
Message: <web.3f32fb11adb6224f6af901ee0@news.povray.org>
Never Mind i figured it out.
:)


Post a reply to this message

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