POV-Ray : Newsgroups : povray.general : Sor / Lathe Discrepancy? (Image on binaries.images) Server Time
6 Aug 2024 12:26:47 EDT (-0400)
  Sor / Lathe Discrepancy? (Image on binaries.images) (Message 1 to 2 of 2)  
From: Lieut Data
Subject: Sor / Lathe Discrepancy? (Image on binaries.images)
Date: 26 Mar 2002 15:44:15
Message: <3ca0dd9f$1@news.povray.org>
After reading through some of the source code for PovRay, I discovered that
(I think) Sor's and Lathe's use cubic splines to calculate their points. But
after rendering the following scene, where each lathe uses the same point
setup as each sor, I am confused.

What method does sor use to calculate splines? (Image on binaries.images)

 #declare myLathe = lathe {
   cubic_spline
   7,
   <0, -5>, //Control Point
   <.8, -.3>,
   <.2, 0>,
   <.3, .3>,
   <.5, .5>,
   <.2, .6>,
   <0, 5> //Control Point
   sturm
   pigment {color rgb<1, 0, 0>}
 }

 #declare mySor = sor {
   7,
   <0, -5>, //Control Point
   <.8, -.3>,
   <.2, 0>,
   <.3, .3>,
   <.5, .5>,
   <.2, .6>,
   <0, 5> //Control Point
   pigment {color rgb<1, 1, 1>}
   sturm
}

object {myLathe translate x*1}
object {mySor translate x*-1}

object {myLathe rotate x*-70 translate <1, 1.5, 3>}
object {mySor rotate x*-70 translate <-1, 1.5, 3>}


Post a reply to this message

From: Warp
Subject: Re: Sor / Lathe Discrepancy? (Image on binaries.images)
Date: 26 Mar 2002 16:22:14
Message: <3ca0e686@news.povray.org>
Lathes and sors obviously use different algorithms for calculating the
splines because sors are more limited than lathes. Thus it's not a
surprise that they look different with the sample control points.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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