POV-Ray : Newsgroups : povray.general : problem with sphere_sweep / linear_spline Server Time
3 Aug 2024 16:26:15 EDT (-0400)
  problem with sphere_sweep / linear_spline (Message 1 to 3 of 3)  
From: Jeremy M  Praay
Subject: problem with sphere_sweep / linear_spline
Date: 23 Nov 2003 02:46:41
Message: <3fc065e1$1@news.povray.org>
The following code seems to produce one "fat leg" and one "skinny leg", and
yet all that changes is the rotation of the sphere sweep.  The only way I
can figure to work around this, is to rotate the sphere_sweep until it gets
skinny again like it's supposed to.  And, changing the scale seems to have
an impact.  Perhaps it just does strange things with a small scale?  Or am I
doing something wrong with the sphere_sweep?

I've looked through the documentation, but I haven't come across anything.

//------------------------------------------------------
global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

plane {
  y, -1
  pigment { color rgb <0.7,0.5,0.3> }
}

#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
    scale 0.02
    rotate x*-90
 }

object { Leg scale <-1,1,1> rotate z*-40 rotate y*52 translate
<-0.045,0.59,0>
  scale 5
  translate <0,-3.5,0>
}

object { Leg scale <-1,1,1> rotate z*-40 rotate y*70 translate
<-0.045,0.59,0>
  scale 5
  translate <0.1,-3.5,0>
}


Post a reply to this message

From: Hughes, B 
Subject: Re: problem with sphere_sweep / linear_spline
Date: 23 Nov 2003 04:13:58
Message: <3fc07a56@news.povray.org>
"Jeremy M. Praay" <sla### [at] hotmailcom> wrote in message
news:3fc065e1$1@news.povray.org...
> The following code seems to produce one "fat leg" and one "skinny leg",
and
> yet all that changes is the rotation of the sphere sweep.  The only way I
> can figure to work around this, is to rotate the sphere_sweep until it
gets
> skinny again like it's supposed to.  And, changing the scale seems to have
> an impact.  Perhaps it just does strange things with a small scale?  Or am
I
> doing something wrong with the sphere_sweep?

Looks mixed up when I render it.

I checked with a scale 10 times larger for everything and then I see what
you are trying to make. So, must be the tiny sizes causing the trouble. I
guess 4 times larger fixes it, meaning an end result of 0.04 for the minimum
radius used in the sphere sweep. Much more than I'd have thought to be
needed. 0.02 unit radius used to be considered too small to work reliably,
for the sphere primitive itself, this is close to that. However,
improvements have been made and yet this doesn't seem to have helped the
sphere sweep. I don't remember much about it's progression though, so I'm
just conveying what I believe might be relevant.

Bob H.


Post a reply to this message

From: Jeremy M  Praay
Subject: Re: problem with sphere_sweep / linear_spline
Date: 23 Nov 2003 11:56:32
Message: <3fc0e6c0$1@news.povray.org>
"Hughes, B." <omn### [at] charternet> wrote in message
news:3fc07a56@news.povray.org...

> I checked with a scale 10 times larger for everything and then I see what
> you are trying to make. So, must be the tiny sizes causing the trouble. I
> guess 4 times larger fixes it, meaning an end result of 0.04 for the
minimum
> radius used in the sphere sweep. Much more than I'd have thought to be
> needed. 0.02 unit radius used to be considered too small to work reliably,
> for the sphere primitive itself, this is close to that. However,
> improvements have been made and yet this doesn't seem to have helped the
> sphere sweep. I don't remember much about it's progression though, so I'm
> just conveying what I believe might be relevant.
>


That seemed to work.  I can't make the sphere sweep "scale 0.02", but I can
make it "scale 0.2" and then scale the leg object at "scale 0.1" later on,
and it works.  I suppose it's just a matter of where the round-off is
occurring.  That's my best guess anyway.

I thought maybe I was missing something obvious.

--
Jeremy


Post a reply to this message

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