POV-Ray : Newsgroups : povray.general : issue when scaling sphere_sweep ( linear_spline ) Server Time
15 Nov 2024 01:15:59 EST (-0500)
  issue when scaling sphere_sweep ( linear_spline ) (Message 1 to 3 of 3)  
From: Jeremy M  Praay
Subject: issue when scaling sphere_sweep ( linear_spline )
Date: 5 Jan 2005 20:56:48
Message: <41dc9ae0$1@news.povray.org>
Basically, if you take a sphere_sweep that's a linear_spline and scale it 
rather small, you can get some very strange defects in the sphere_sweep. 
Rotating the object and changing the scale seems to take care of the problem 
in some cases.  I mentioned this quite awhile ago, but then I never got back 
to it.  Additionally, it seems to worsened from 3.5 to 3.6.

I would simply guess that the scale is too small (which can happen), except 
for the fact that if you change it into a cubic_spline, the defect goes 
away, and the sphere_sweep can be scaled much smaller.  I've scaled 
sphere_sweeps in various sizes that were cubic_splines, and I've never 
noticed this problem.

Using the code below (complete scene meant to create an insect leg), you can 
easily and quickly see how changing the scale from 0.3 to 0.05 increases the 
defect in the leg.  Rotating the leg can make the defect disappear (in some 
cases), or make it much worse.  Uncommenting the code in the "object" 
section (and keeping everything else) shows how the problem can appear 
differently, depending on the rotation.

Am I missing something?  Or is it a known issue?  Should this be reported as 
a bug?

(written for pov 3.6.1)

---------------

camera {
  location  <0.0, 0.5, -4.0>
  look_at   <0.0, 0,  0.0>
}

background {rgb 1}

#declare Leg=
  sphere_sweep {
    linear_spline
    7,
    <0,0>, 0.2,
    <1,0>, 0.15,
    <1.5,-1>, 0.15,
    <3.75,-0.6>, 0.25,
    <6,0>, 0.15,
    <7,-4>, 0.1,
    <8,-4.3>, 0.1
 }

object { Leg
  scale 0.2
  //rotate x*-60
  //rotate z*-40
  //rotate y*52
  //scale 0.2
}


-- 
Jeremy
www.beantoad.com


Post a reply to this message

From: Jeremy M  Praay
Subject: Re: issue when scaling sphere_sweep ( linear_spline )
Date: 20 Jan 2005 08:18:13
Message: <41efaf95$1@news.povray.org>
Am I the only one that uses sphere_sweeps with linear_splines?

:-(

-- 
Jeremy
www.beantoad.com


"Jeremy M. Praay" <sla### [at] hotmailcom> wrote in message 
news:41dc9ae0$1@news.povray.org...
> Basically, if you take a sphere_sweep that's a linear_spline and scale it 
> rather small, you can get some very strange defects in the sphere_sweep. 
> Rotating the object and changing the scale seems to take care of the 
> problem in some cases.  I mentioned this quite awhile ago, but then I 
> never got back to it.  Additionally, it seems to worsened from 3.5 to 3.6.
>
> I would simply guess that the scale is too small (which can happen), 
> except for the fact that if you change it into a cubic_spline, the defect 
> goes away, and the sphere_sweep can be scaled much smaller.  I've scaled 
> sphere_sweeps in various sizes that were cubic_splines, and I've never 
> noticed this problem.
>
> Using the code below (complete scene meant to create an insect leg), you 
> can easily and quickly see how changing the scale from 0.3 to 0.05 
> increases the defect in the leg.  Rotating the leg can make the defect 
> disappear (in some cases), or make it much worse.  Uncommenting the code 
> in the "object" section (and keeping everything else) shows how the 
> problem can appear differently, depending on the rotation.
>
> Am I missing something?  Or is it a known issue?  Should this be reported 
> as a bug?
>
> (written for pov 3.6.1)
>
> ---------------
>
> camera {
>  location  <0.0, 0.5, -4.0>
>  look_at   <0.0, 0,  0.0>
> }
>
> background {rgb 1}
>
> #declare Leg=
>  sphere_sweep {
>    linear_spline
>    7,
>    <0,0>, 0.2,
>    <1,0>, 0.15,
>    <1.5,-1>, 0.15,
>    <3.75,-0.6>, 0.25,
>    <6,0>, 0.15,
>    <7,-4>, 0.1,
>    <8,-4.3>, 0.1
> }
>
> object { Leg
>  scale 0.2
>  //rotate x*-60
>  //rotate z*-40
>  //rotate y*52
>  //scale 0.2
> }
>
>
> -- 
> Jeremy
> www.beantoad.com
>


Post a reply to this message

From: Warp
Subject: Re: issue when scaling sphere_sweep ( linear_spline )
Date: 20 Jan 2005 08:47:13
Message: <41efb661@news.povray.org>
Jeremy M. Praay <jer### [at] questsoftwarecom> wrote:
> Am I the only one that uses sphere_sweeps with linear_splines?

  This is just a case where it's usually very unclear whether there really
is a genuine bug in the code or if it's just a question of floating point
(in)accuracy. If it's the latter, then there's little that can be done.

  Investigating whether it's a bug or just a limitation of fp numbers
can be quite laborious and it's understandable that people might not
always be eager to start investigating.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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