POV-Ray : Newsgroups : povray.general : a function Server Time
6 Aug 2024 08:16:48 EDT (-0400)
  a function (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From:
Subject: Re: a function
Date: 26 May 2002 17:12:44
Message: <3cf14fcc@news.povray.org>
"Dennis Miller" <dhm### [at] attbicom> wrote in message
news:3cf13fd8$1@news.povray.org...
> Thanks. I tried that and it looks interesting, but I am trying to
"extrude"
> the pattern on the surface of the plane into the -z axis. In other words,
I
> would like the pattern to rise out of the plane into z space (i.e., into
the
> viewer's face) during an animation (make sense?) Which of the parameters
> would expect to do that, or does this make no sense?

What about a heightfield?


Post a reply to this message

From: Dennis Miller
Subject: Re: a function
Date: 26 May 2002 17:47:52
Message: <3cf15808$1@news.povray.org>
Please see pbi for the code and the current version of the image. I would
love to know if you have any suggestions.
Thanks,
D.


message news:3cf14fcc@news.povray.org...
> "Dennis Miller" <dhm### [at] attbicom> wrote in message
> news:3cf13fd8$1@news.povray.org...
> > Thanks. I tried that and it looks interesting, but I am trying to
> "extrude"
> > the pattern on the surface of the plane into the -z axis. In other
words,
> I
> > would like the pattern to rise out of the plane into z space (i.e., into
> the
> > viewer's face) during an animation (make sense?) Which of the parameters
> > would expect to do that, or does this make no sense?
>
> What about a heightfield?
>
>


Post a reply to this message

From: Michael Andrews
Subject: Re: a function
Date: 27 May 2002 09:05:52
Message: <3CF23169.FF4E9361@reading.ac.uk>
Hi Ingo,

ingo wrote:
> 
> There is more interesting stuff on the site, for example:
> http://glinda.lrsm.upenn.edu/~weeks/lcca1.html
> Would it be possible to make a POV-Ray pattern like that?
> 
> Ingo

Well, this one is easy :-)

// -- start --
#include "functions.inc"

global_settings { assumed_gamma 1.0 max_trace_level 5 }

background { color rgb 0.6*<4/7,5.5/7,1>^4 }

#declare camPos = <0.2, 7.5, -17.5>*15;
#declare camLookAt = <0,0,0>;
#declare camAngle = 30;

camera {
	up <0, 1, 0>
	right x*image_width/image_height
	location  camPos
	look_at   camLookAt
	angle     camAngle
}

#declare fn_Rad = function { pigment { radial colour_map{[0 rgb 0][1 rgb
1]}} }
#declare fn_Cusp = function {
fn_Rad(f_snoise3d(x/4,0,z/4),0,f_snoise3d(x/4,100,z/4)).x }

plane {
  y, 0
  pigment { function { fn_Cusp(x,y,z) }
    colour_map {[0 rgb x][1/3 rgb y][2/3 rgb z][1 rgb x]}
  }
  finish { ambient 1 diffuse 0 }
  rotate -90*x
  scale 5
}
// -- end --

Bye for now,
	Mike Andrews.


Post a reply to this message

From: Dennis Miller
Subject: Re: a function
Date: 27 May 2002 10:05:41
Message: <3cf23d35@news.povray.org>
That's really sharp. I am trying to turn that into a function for an
isosurface but am having some trouble. Might you assist?
Dennis


"Michael Andrews" <m.c### [at] readingacuk> wrote in message
news:3CF23169.FF4E9361@reading.ac.uk...
> Hi Ingo,
>
> ingo wrote:
> >
> > There is more interesting stuff on the site, for example:
> > http://glinda.lrsm.upenn.edu/~weeks/lcca1.html
> > Would it be possible to make a POV-Ray pattern like that?
> >
> > Ingo
>
> Well, this one is easy :-)
>
> // -- start --
> #include "functions.inc"
>
> global_settings { assumed_gamma 1.0 max_trace_level 5 }
>
> background { color rgb 0.6*<4/7,5.5/7,1>^4 }
>
> #declare camPos = <0.2, 7.5, -17.5>*15;
> #declare camLookAt = <0,0,0>;
> #declare camAngle = 30;
>
> camera {
> up <0, 1, 0>
> right x*image_width/image_height
> location  camPos
> look_at   camLookAt
> angle     camAngle
> }
>
> #declare fn_Rad = function { pigment { radial colour_map{[0 rgb 0][1 rgb
> 1]}} }
> #declare fn_Cusp = function {
> fn_Rad(f_snoise3d(x/4,0,z/4),0,f_snoise3d(x/4,100,z/4)).x }
>
> plane {
>   y, 0
>   pigment { function { fn_Cusp(x,y,z) }
>     colour_map {[0 rgb x][1/3 rgb y][2/3 rgb z][1 rgb x]}
>   }
>   finish { ambient 1 diffuse 0 }
>   rotate -90*x
>   scale 5
> }
> // -- end --
>
> Bye for now,
> Mike Andrews.


Post a reply to this message

From: ingo
Subject: Re: a function
Date: 27 May 2002 11:15:13
Message: <Xns921BB0081C9D2seed7@povray.org>
in news:3CF23169.FF4E9361@reading.ac.uk Michael Andrews wrote:

> Well, this one is easy :-)

Yeah, right.

> [...]
> #declare fn_Rad = function { pigment { radial colour_map{[0 rgb 0][1 rgb
> 1]}} }

Replacing radial by cells also gives a nice result, with other patterns it 
looks more like prepared rat organs under a microscope. 

Thanks,

Ingo


Post a reply to this message

From: Michael Andrews
Subject: Re: a function
Date: 27 May 2002 11:17:53
Message: <3CF2505C.EF88DF7B@reading.ac.uk>
Hi Dennis,

Dennis Miller wrote:
> 
> That's really sharp. I am trying to turn that into a function for an
> isosurface but am having some trouble. Might you assist?
> Dennis
> 

I don't think you can make a sensible isosurface of it - each cusp
represents a discontinuity in the function and isosurfaces tend to give
up and sulk at that point ...

Mike Andrews.

PS: changing fn_Cusp to ...

#declare fn_Cusp = function {
fn_Rad(f_snoise3d(x/2,0,z/10),0,f_snoise3d(x/10,100,z/2)).x }

... makes a nice wet-on-wet watercolour varaition.


Post a reply to this message

From: Gilles Tran
Subject: Re: a function
Date: 27 May 2002 11:30:42
Message: <3cf25122$1@news.povray.org>

Xns### [at] povrayorg...

> Just a nice function to play with, vary the floats A-L.

Hey, it looks a lot like the family of functions I played with when I first
used isosurfaces some years ago. I used the best ones in this image :
http://www.oyonale.com/ldc/english/reading.htm

I recently tried to convert the old iso code to Povray 3.5 with moderate
success but I could try harder and make them available. They are still the
coolest thing, particularly when animated.

G.


--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Ron Parker
Subject: Re: a function
Date: 4 Jun 2002 15:13:26
Message: <slrnafq4ap.b87.ron.parker@fwi.com>
On 25 May 2002 18:08:09 -0400, ingo wrote:
> And this as an inspiration for Ron:
> http://glinda.lrsm.upenn.edu/~weeks/software/quasic.html

I'll bet you all thought I was dead.

This is pretty, but unfortunately the algorithm he describes doesn't seem to 
lend itself to arbitrary evaluation like we need for procedural textures.

However, it seems to be related to the fact that a Penrose tiling is the
projection of a 5-dimensional lattice onto a 2-dimensional plane with a
specific rotation with respect to the lattice.  For a procedural texture, of
course, one might choose instead to use the projection of a 5-dimensional
lattice onto a 3-dimensional space.  

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: ingo
Subject: Re: a function
Date: 7 Jun 2002 03:40:24
Message: <Xns922662F21D11Cseed7@povray.org>
in news:slr### [at] fwicom Ron Parker wrote:

> On 25 May 2002 18:08:09 -0400, ingo wrote:
>> And this as an inspiration for Ron:
>> http://glinda.lrsm.upenn.edu/~weeks/software/quasic.html
> 
> I'll bet you all thought I was dead.

and buried under a load of code..

> [...] one might choose instead to use the
> projection of a 5-dimensional lattice onto a 3-dimensional space.  

What would the result look like? Would every single tile take a limited 
amount of 3d space instead of being streched to infinity along one axis 
(like the hexagon pattern). Would it tile/tesselate in all 3 dimensions?

Ingo


Post a reply to this message

From: Ron Parker
Subject: Re: a function
Date: 7 Jun 2002 10:48:35
Message: <slrnag1hu4.h6b.ron.parker@fwi.com>
On 7 Jun 2002 03:40:24 -0400, ingo wrote:
> in news:slr### [at] fwicom Ron Parker wrote:
> 
>> On 25 May 2002 18:08:09 -0400, ingo wrote:
>>> And this as an inspiration for Ron:
>>> http://glinda.lrsm.upenn.edu/~weeks/software/quasic.html
>> 
>> I'll bet you all thought I was dead.
> 
> and buried under a load of code..
> 
>> [...] one might choose instead to use the
>> projection of a 5-dimensional lattice onto a 3-dimensional space.  
> 
> What would the result look like? Would every single tile take a limited 
> amount of 3d space instead of being streched to infinity along one axis 
> (like the hexagon pattern). Would it tile/tesselate in all 3 dimensions?

Yes.  They'd be something like the crackle pattern, but with a stronger
appearance of periodicity.

See http://www.cmp.caltech.edu/~lifshitz/quasicrystals.html for the real-life
version, and http://www.geom.umn.edu/apps/quasitiler/about.html for the math.

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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