POV-Ray : Newsgroups : povray.general : Cubic spline question : Re: Cubic spline question Server Time
6 Aug 2024 23:25:23 EDT (-0400)
  Re: Cubic spline question  
From:
Date: 18 Feb 2002 05:49:21
Message: <j4j17u0sbm72id5dffh7bnsr9g9cu92f1k@4ax.com>
On Fri, 15 Feb 2002 23:20:56 +0100, "Rune" <run### [at] mobilixnetdk>
wrote:
> I'm getting confused by cubic splines.

Rune, In general I agree with you that one spline_type_name should always
produce the same shape apart from place of use. When name specifies not exact
type but class of types then perhaps it's good idea to modify name. I think it
could be great when the way how splines are defined would be somehow unified
(for example I don't understand why I have to write number of points for
splines in objects while I haven't to in splin{} syntax - I prefer spline{}
behaviour in this case). I think also it could be great when all places where
some splines can be used would accept all builded types of splines. I'm even
so radical in this that I think it could be great if ttfs could be imported as
splines and avilable for anything and then create object as prism. But it
sounds more like modeller not raytracer :-)

If you really need to have spline and lathe/prism with the same shape then
there is no problem (as advenced user as you shouldn't have problems with
obvious creation with mesh). Anyway, I prepared some iso-conversion example
for other confused users less advanced than you.

Iso-lathe has all features of lathe{} except it can't have more than two
values for the same y (in basic form, perhaps after modifications this
limitations could be removed). Rendering of this iso-lathe alone is rather
fast.

Iso-prism (or rather parametric-prism) has no inside and is always open but
spline can be not closed. Rendering of this prism clone is rather slow.

Script available at:
http://news.povray.org/3oj17ukbdclmo92oljkd1pisr6ubsaasf2%404ax.com
Preview available at:
http://news.povray.org/0fm17ucj8h2rpb7u6ia5r5kuvd7ql58jb2%404ax.com

ABX
--
disc{z,-z 5#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e,1))*.1-4#declare
e=e-1;#end#local e=26;pigment{#local g=function(_){ceil(_)-_}function#local//X
k=function{pattern{object{sphere_sweep{linear_spline 13#while(e>0)<O(),O()//AB
>.01#end}}}}{k(g(atan2(x,y)),g(ln((y+x)^2+1e-5)),0)}}finish{ambient 1}}//POV35


Post a reply to this message

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