POV-Ray : Newsgroups : povray.binaries.images : Spherical Sweep Bug or Something else? Server Time
4 Nov 2024 19:20:15 EST (-0500)
  Spherical Sweep Bug or Something else? (Message 1 to 6 of 6)  
From: Woody
Subject: Spherical Sweep Bug or Something else?
Date: 27 Mar 2010 23:55:01
Message: <web.4baed21667547a80876671bb0@news.povray.org>
I need some help figuring out this output I'm getting (Attached). I can't tell
if its a bug or someting else that I just don't know about like surface
coincidence. I don't recognize what might be causing the planar like objects.

The spherical sweep code is

#declare i_start = 0;
#declare i_stop = 3;
#declare i_step = 0.05;
#declare i_inc = i_start;
sphere_sweep {
  linear_spline                 // linear curve
  //cubic_spline                // alternative spline curves
  //b_spline
  (i_stop - i_start)/i_step + 1,    // number of specified sphere positions
#while(i_inc<=i_stop)
  #declare y_coor = 0.23*sin(7.1*i_inc);
  <i_inc, y_coor, 0>, 0.05
        #declare i_inc = i_inc + i_step;


#end


pigment{color Orange}

}

The scene file is



#version 3.6;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}


camera {
  location  <0, 0.0, -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, -2
  pigment { color rgb <0.7,0.5,0.3> }
}

#declare i_start = 0;
#declare i_stop = 3;
#declare i_step = 0.05;
#declare i_inc = i_start;
sphere_sweep {
  linear_spline                 // linear curve

  (i_stop - i_start)/i_step + 1,    // number of specified sphere positions
#while(i_inc<=i_stop)

  #declare y_coor = 0.23*sin(7.1*i_inc);
  <i_inc, y_coor, 0>, 0.05
        #declare i_inc = i_inc + i_step;


#end


pigment{color Orange}

}

Can someone explain this?


Post a reply to this message


Attachments:
Download 'sun20100327a.png' (15 KB)

Preview of image 'sun20100327a.png'
sun20100327a.png


 

From: Tim Attwood
Subject: Re: Spherical Sweep Bug or Something else?
Date: 28 Mar 2010 06:00:21
Message: <4baf28b5$1@news.povray.org>
>I need some help figuring out this output I'm getting (Attached). I can't 
>tell
> if its a bug or someting else that I just don't know about like surface
> coincidence. I don't recognize what might be causing the planar like 
> objects.

> Can someone explain this?

Sphere sweep has been buggy since it's introduction in 3.6...

Here's a workaround that uses a macro instead...

// a sphere sweep
#macro Sweep(SPL, from, to, rez)
 #local eval_to = to;
 #local C = from;
 sphere {<SPL(C).x,SPL(C).y,SPL(C).z>,SPL(C).t}
 #while (C<eval_to-rez)
  cone {<SPL(C).x,SPL(C).y,SPL(C).z>,SPL(C).t,
  <SPL(C+rez).x,SPL(C+rez).y,SPL(C+rez).z>,SPL(C+rez).t}
  sphere {<SPL(C+rez).x,SPL(C+rez).y,SPL(C+rez).z>,
    SPL(C+rez).t}
  #local C=C+rez;
 #end
#end

// a spline for the sweep
#declare i_start = 0;
#declare i_stop = 3;
#declare i_step = 0.05;
#declare i_inc = i_start;
#declare wave = spline {
   natural_spline //linear_spline
   #while(i_inc <= i_stop)
      i_inc, <i_inc,0.23*sin(7.1*i_inc),0,0.05>
      #local i_inc = i_inc + i_step;
   #end
};

// the sweep object
union {
   Sweep(wave,0,3,0.005)
   pigment{color Orange}
}


Post a reply to this message

From: clipka
Subject: Re: Spherical Sweep Bug or Something else?
Date: 28 Mar 2010 09:38:40
Message: <4baf5be0$1@news.povray.org>
Am 28.03.2010 05:50, schrieb Woody:
> I need some help figuring out this output I'm getting (Attached). I can't tell
> if its a bug or someting else that I just don't know about like surface
> coincidence. I don't recognize what might be causing the planar like objects.

That looks... um, shall we say, "interesting"? :-)

Seriously, that's a bug if I've ever seen one (and I've seen a few ;-)). 
Obviously not only the cubic_spline sphere sweep needs reworking, but 
also the linear_spline variant.


Post a reply to this message

From: Eric Allen
Subject: Re: Spherical Sweep Bug or Something else?
Date: 28 Mar 2010 10:01:03
Message: <4BAF611E.3070403@peoplepc.com>
clipka wrote:
> Am 28.03.2010 05:50, schrieb Woody:
> 
> That looks... um, shall we say, "interesting"? :-)
> 

Save the code, it looks like a Dragon to me...
-- 
--
Eric


Post a reply to this message

From: Alain
Subject: Re: Spherical Sweep Bug or Something else?
Date: 28 Mar 2010 12:54:23
Message: <4baf89bf$1@news.povray.org>

> I need some help figuring out this output I'm getting (Attached). I can't tell
> if its a bug or someting else that I just don't know about like surface
> coincidence. I don't recognize what might be causing the planar like objects.
>
> The spherical sweep code is
>
> #declare i_start = 0;
> #declare i_stop = 3;
> #declare i_step = 0.05;
> #declare i_inc = i_start;
> sphere_sweep {
>    linear_spline                 // linear curve
>    //cubic_spline                // alternative spline curves
>    //b_spline
>    (i_stop - i_start)/i_step + 1,    // number of specified sphere positions
> #while(i_inc<=i_stop)
>    #declare y_coor = 0.23*sin(7.1*i_inc);
>    <i_inc, y_coor, 0>, 0.05
>          #declare i_inc = i_inc + i_step;
>
>
> #end
>
>
> pigment{color Orange}
>
> }
>
> The scene file is
>
>
>
> #version 3.6;
>
> #include "colors.inc"
>
> global_settings {
>    assumed_gamma 1.0
> }
>
>
> camera {
>    location<0, 0.0, -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, -2
>    pigment { color rgb<0.7,0.5,0.3>  }
> }
>
> #declare i_start = 0;
> #declare i_stop = 3;
> #declare i_step = 0.05;
> #declare i_inc = i_start;
> sphere_sweep {
>    linear_spline                 // linear curve
>
>    (i_stop - i_start)/i_step + 1,    // number of specified sphere positions
> #while(i_inc<=i_stop)
>
>    #declare y_coor = 0.23*sin(7.1*i_inc);
>    <i_inc, y_coor, 0>, 0.05
>          #declare i_inc = i_inc + i_step;
>
>
> #end
>
>
> pigment{color Orange}
>
> }
>
> Can someone explain this?

It's just another instance of the sphere_sweep bug that receive so much 
comments these days.

The interesting thing is that the linear_spline shows all those 
artefacts while cubic_cpline is clean, and b_spline mostly clean but 
does show a small artefact on the right. (a slight, narrow, black line)

Maybe the readon I normaly don't have much artefacts, I tend to mostly 
use cubic_spline in my scenes.

Best----> cubic_spline
Correct-> b_spline
Worst---> linear_spline



Alain


Post a reply to this message

From: Woody
Subject: Re: Spherical Sweep Bug or Something else?
Date: 31 Mar 2010 20:35:01
Message: <web.4bb3e9ac786dbd6a68bbd4510@news.povray.org>
Revised picture and code going into bug system

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}


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

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


#declare i_start = 0;
#declare i_stop = 3;
#declare i_step = 0.05;
#declare i_inc = i_start;
sphere_sweep {
  linear_spline                 // linear curve

  (i_stop - i_start)/i_step + 1,    // number of specified sphere positions
#while(i_inc<=i_stop)

  #declare y_coor = 0.23*sin(7.1*i_inc);
  <i_inc, y_coor, 0>, 0.05
        #declare i_inc = i_inc + i_step;


#end

pigment{color Orange}

}


Post a reply to this message


Attachments:
Download 'bugtest.png' (35 KB)

Preview of image 'bugtest.png'
bugtest.png


 

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