POV-Ray : Newsgroups : povray.binaries.images : Gothic Splines Server Time
26 Dec 2024 01:07:52 EST (-0500)
  Gothic Splines (Message 1 to 9 of 9)  
From: Lonster
Subject: Gothic Splines
Date: 11 Apr 2004 17:37:50
Message: <4079baae@news.povray.org>
Does anyone know of a patch that will let POV use an array of vectors as a
spline?  I would like to do more complex vaulting but using pieces of a
torus for the ribs is tedious at best.  Sphere_sweeps would be better.  Pov
can easily generate the vectors I need to do Tudor (think Westminster Abby)
type traceries, but the only way I see to use them as splines is to dump the
data to a file and then paste it back in by hand.  Or am I missing
something?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 2/16/2004


Post a reply to this message


Attachments:
Download 'nave focal blur.jpg' (57 KB)

Preview of image 'nave focal blur.jpg'
nave focal blur.jpg


 

From: Dan P
Subject: Re: Gothic Splines
Date: 11 Apr 2004 17:59:00
Message: <4079bfa4$1@news.povray.org>
Lonster wrote:

> Does anyone know of a patch that will let POV use an array of vectors as a
> spline?  I would like to do more complex vaulting but using pieces of a
> torus for the ribs is tedious at best.  Sphere_sweeps would be better.  Pov
> can easily generate the vectors I need to do Tudor (think Westminster Abby)
> type traceries, but the only way I see to use them as splines is to dump the
> data to a file and then paste it back in by hand.  Or am I missing
> something?

Wow, great perspective! It really gives it a great sense of height.

I'm a little confused here -- isn't a spline an array of vectors by 
nature? Do you have some sample code that you would like to see work? 
I'm thinking you might mean "passing an array of vectors" to a spline, 
which would put each vector at the location in the array. You might be 
able to get away with making a macro to do this.

I've seen, in IRTC scene files, a lot of people using a height_field to 
create the intricate parts. It seems to work well, particularly when you 
interpolate the source bitmap. I know that's not what you're looking 
for; just something I've seen done well with high resolution bitmaps :-)

-- 
Respectfully,
Dan P
http://<broken link>


Post a reply to this message

From: Lonster
Subject: Re: Gothic Splines
Date: 11 Apr 2004 22:52:02
Message: <407a0452$1@news.povray.org>
Yes!  Passing an array of vectors to a spline is exactly what I mean.
Consider this:

#declare MyVectors=array[100]
#declare MySize=array[100]

#declare step_value=.01;

#declare my_index=0;
#while (my_index<1)
  #declare my_radius=my_index*15;
  #declare my_heading=sin(my_index*12)*pi/2;
  #declare my_elevation=sin(my_index*28)*pi/32;
  #declare my_x=cos(my_heading)*my_radius;
  #declare my_z=sin(my_heading)*my_radius;
  #declare my_y=sin(my_elevation)*my_radius;
  #declare my_sphere_size=.5+sin(my_index*35)*.2;
  sphere {<my_x,my_y,my_z>,my_sphere_size
    pigment {color rgb <.8,.7,.9>}
  }
  #declare MyVectors[my_index*100]=<my_x, my_y, my_z>;
  #declare my_index=my_index+step_value;
#end

This creates an array of vectors MyVectors[].  I could of course get things
smooth by using spheres and cylinders and decreasing the step_value, but how
much better if I could do something like

#declare myspline=spline{
  linear_spline
  #declare index=0;
  #while (index<100)
    MyVectors[index]
    #declare index=index+1;
  #end
}

This does NOT work!  It returns with ERROR: Spline must have at least one
entry.  The work-around I have been using is to use Python to generate in
it's shell window, copy them to the clipboard, and paste them into my POV
code directly.  Clunky, but it works.






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 2/16/2004


Post a reply to this message

From: Dan P
Subject: Re: Gothic Splines
Date: 11 Apr 2004 23:27:48
Message: <407a0cb4$1@news.povray.org>
Lonster wrote:

> Yes!  Passing an array of vectors to a spline is exactly what I mean.
> Consider this:
> 

<snip:technical />

> #declare myspline=spline{
>   linear_spline
>   #declare index=0;
>   #while (index<100)
>     MyVectors[index]
>     #declare index=index+1;
>   #end
> }
> 
> This does NOT work!  It returns with ERROR: Spline must have at least one
> entry.  The work-around I have been using is to use Python to generate in
> it's shell window, copy them to the clipboard, and paste them into my POV
> code directly.  Clunky, but it works.

Aha! The problem is that you need a float value to specify which moment 
in time POV-Ray will assign the vector. Try this instead:

#declare myspline=spline{
   linear_spline
   #declare index=0;
   #while (index<100)
     index MyVectors[index]
     #declare index=index+1;
   #end
}

Note the "index" in front of the MyVectors[index].
-- 
Respectfully,
Dan P
http://<broken link>


Post a reply to this message

From: Lonster
Subject: Re: Gothic Splines
Date: 12 Apr 2004 00:38:57
Message: <407a1d61@news.povray.org>
Bravo Mr. Prust!

     Now I can easily define my pointed vaulted ceilings as functions
instead of arcs.  I had been using chopped up cylinders before to carve them
out of a box, now I can use prisms and have real control.  This worked
smoothly first try with the same array and the vertex count reduced to one
fourth. Thank you!  Lonster

#declare myspline=spline{
  linear_spline
  #declare index=0;
  #while (index<100)
    index MyVectors[index]
    #declare index=index+1;
  #end
}

sphere_sweep {
  cubic_spline
  25,
  #declare index=0;
  #while (index<100)
    MyVectors[index],.2
    #declare index=index+4;
  #end
  pigment {color rgb <.8,.7,.9>}
}



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 2/16/2004


Post a reply to this message

From: Lonster
Subject: Re: Gothic Splines
Date: 12 Apr 2004 02:49:48
Message: <407a3c0c@news.povray.org>
I quickly found out that the arrays aren't even needed if the splines are
defined on the spot.  Passing arrays to splines is a powerful feature still,
since an array can easily be read in from a file.  I'm already working this
into animations - spline vectors as a function of the clock!  Here's the
code for the exotic vase:

#declare vase=union{
  #declare index2=0;
  #while (index2<360)
     sphere_sweep {
      cubic_spline
      25,
      #declare index=0;
      #while (index<1)
        #declare rad=10-index*7;
        #declare myvector=<sin(index*pi*3)*2+rad,index*10,0>;
        #declare myrad=rad/15;
        myvector,myrad  // <---------------------right here is where the
vectors and size data are inserted in the spline
        #declare index=index+.04;
      #end
      texture {
        pigment{
          agate
          color_map{
            [0.00 color rgb <1,0,0>]
            [0.50 color rgb <0,1,0>]
            [1.00 color rgb <0,0,1>]
          }
        }
        finish {ambient.3 specular .4 diffuse .35}
      }
      rotate <20,index2,0>
    }
    #declare index2=index2+5;
  #end
}


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 2/16/2004


Post a reply to this message


Attachments:
Download 'vase.jpg' (70 KB)

Preview of image 'vase.jpg'
vase.jpg


 

From: Lonster
Subject: Re: Gothic Splines
Date: 12 Apr 2004 02:54:45
Message: <407a3d35@news.povray.org>
I quickly found out that the arrays aren't even needed if the splines are
defined on the spot.  Passing arrays to splines is a powerful feature still,
since an array can easily be read in from a file.  I'm already working this
into animations - spline vectors as a function of the clock!  Here's the
code for the exotic vase:

#declare vase=union{
  #declare index2=0;
  #while (index2<360)
     sphere_sweep {
      cubic_spline
      25,
      #declare index=0;
      #while (index<1)
        #declare rad=10-index*7;
        #declare myvector=<sin(index*pi*3)*2+rad,index*10,0>;
        #declare myrad=rad/15;
        myvector,myrad  // <---------------------right here is where the
vectors and size data are inserted in the spline
        #declare index=index+.04;
      #end
      texture {
        pigment{
          agate
          color_map{
            [0.00 color rgb <1,0,0>]
            [0.50 color rgb <0,1,0>]
            [1.00 color rgb <0,0,1>]
          }
        }
        finish {ambient.3 specular .4 diffuse .35}
      }
      rotate <20,index2,0>
    }
    #declare index2=index2+5;
  #end
}


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 2/16/2004





---

File has not been scanned

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 2/16/2004


Post a reply to this message


Attachments:
Download 'vase.jpg' (70 KB)

Preview of image 'vase.jpg'
vase.jpg


 

From: St 
Subject: Re: Gothic Splines
Date: 12 Apr 2004 03:00:00
Message: <407a3e70@news.povray.org>
"Lonster" <lwe### [at] sofnetcom> wrote in message
news:407a3d35@news.povray.org...

   Heh... I like both of them... ;)

    Very nice.

   ~Steve~


Post a reply to this message

From: Dan P
Subject: Re: Gothic Splines
Date: 12 Apr 2004 21:39:26
Message: <407b44ce$1@news.povray.org>
Lonster wrote:

> Bravo Mr. Prust!

No problem! :-D

-- 
Respectfully,
Dan P
http://<broken link>


Post a reply to this message

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