POV-Ray : Newsgroups : povray.binaries.images : ISO Sea Server Time
2 Nov 2024 04:22:28 EDT (-0400)
  ISO Sea (Message 1 to 8 of 8)  
From: H  Karsten
Subject: ISO Sea
Date: 24 Nov 2011 22:05:02
Message: <web.4ecf03c8f0b1abeea3bfeb720@news.povray.org>
Hi people,
I just wrote a formula-generator for an iso-surface to generate sea-surfaces.

It parameters for the count of waves the size for the biggest and smallest,
their speed and direction.

Have fun,
Holger Karsten
//################################################################
// PoVRay 3.7 Scene File "Sea_test.pov"
// author:  Holger Karsten
// date:    23th November 2011
// CC
//--------------------------------------------------------------------------
#version 3.7;// runs from 3.5 up

camera {
angle 75
location  <10,10,-30>
right     x*image_width/image_height
look_at   0
/*
  aperture .1
  blur_samples 4
  focal_point <0,0,100000>
  confidence 0.95
  variance 1/16384
*/
}

light_source{<10,100000,300000> color rgb 1}
light_source{<10,10,-30> color rgb .2} //same as the camera to do ambient light

sky_sphere {
pigment{
 gradient <0,1,0>
 color_map {
  [0.00 rgb 0]//<0.6,0.7,1.0>]
  [0.35 rgb 0]//<0.1,0.0,0.8>]
  [0.45 rgb <0.1,0.0,0.8>/2]
  [0.00/2+0.5 rgb <0.6,0.7,1.0>]
  [0.35/2+0.5 rgb <0.1,0.0,0.8>]
  [0.65/2+0.5 rgb <0.1,0.0,0.8>]
  [1.00/2+0.5 rgb <0.6,0.7,1.0>]
 }
 translate y/2 scale 2
 }
}

#declare Size_of_surface=700;
#declare NumberOfWaves=5;
#declare Scale_for_biggest_wave =<10,4,35>;
#declare Scale_for_smallest_wave=<0.5,.15,0.5>;
#declare Direction_for_biggest_wave  =<0.025,0,0>;
#declare Direction_for_smallest_wave =<0.025,0.1,0>;
#declare Scaling_down_the_values     =1.15; // adjust when values for smallest
                                            // waves take place (1=take place
                                            // at smallest wave >1 take place
                                            // before)
#declare Radius=7;       //(sphere)


#declare Water=true;
#declare Ball=true;

#declare High_scale=spline{linear_spline
1 <Scale_for_biggest_wave.y,0>
NumberOfWaves/Scaling_down_the_values <Scale_for_smallest_wave.y,0>}
#declare Wide_scale=spline{linear_spline
1 Scale_for_biggest_wave
NumberOfWaves/Scaling_down_the_values Scale_for_smallest_wave}
#declare Direction=spline{linear_spline
1 Direction_for_biggest_wave
NumberOfWaves/Scaling_down_the_values Direction_for_smallest_wave}
#declare Timing=spline{linear_spline
1 <frame_number/10 ,0>
NumberOfWaves/Scaling_down_the_values <frame_number/1,0>}
#declare noise=function{internal(76)}
#declare Seed=seed(2762347);

#declare SeaSurface=isosurface {
function {y
#declare Gt=1;
#while (Gt<NumberOfWaves)
#declare Z=1000*rand(Seed);
#declare F=High_scale(Gt).u;
#declare Spd=Timing(Gt).u;
#declare Drc=Direction(Gt)*Timing(NumberOfWaves-Gt).u;
#declare Dx=Drc.x;
#declare Dy=Drc.y;
#declare Dz=Drc.z;
#declare WSx=Wide_scale(Gt).x;
#declare WSz=Wide_scale(Gt).z;
+noise(x/WSx+Z+Dx,Dy,z/WSz+Z+Dz)*F
#declare Gt=Gt+1;
#end
}
max_gradient 1
contained_by {box {
<-Size_of_surface,-8,-Size_of_surface>,
<Size_of_surface,8,Size_of_surface>
}}

interior{ior 1.32}
texture {
pigment{color
rgb 0}
finish{specular 1 roughness 0.0025 reflection{0.1,1.1 fresnel on}ambient 0
diffuse 1}
normal{granite -.125 scale 4}
}}

#declare Loc=trace(SeaSurface,<0,10,0>,<0,-10,0>);
#declare Locy=Loc.y+Radius/1.25;

#declare Rotation=<11,22,33>;

#declare R=1;
#while (R<(frame_number+2))
#declare
Rotation=Rotation+<rand(Seed)*.1,rand(Seed)*.1,rand(Seed)*.1>-<0.025,0.05,0.1>*1.5;
#declare R=R+1;
#end

#if (Water)
object{SeaSurface}
#end
#if (Ball)
sphere {
  0,Radius/1.1
  interior{ior 1.25}
  texture {
    pigment {
      radial
      frequency 8
      color_map {
        [0.00 color rgb <1.0,0.4,0.2> ]
        [0.33 color rgb <0.2,0.4,1.0> ]
        [0.66 color rgb <0.4,1.0,0.2> ]
        [1.00 color rgb <1.0,0.4,0.2> ]
      }
    }
    finish{
      ambient 0 diffuse 1
      reflection {0,1.5 fresnel on}
    }
  }
rotate Rotation
#declare P=Loc+Radius/1.4;
translate P*y
}
#end


Post a reply to this message


Attachments:
Download 'sea-test.gif' (1518 KB)

Preview of image 'sea-test.gif'
sea-test.gif


 

From: clipka
Subject: Re: ISO Sea
Date: 25 Nov 2011 01:29:01
Message: <4ecf35ad$1@news.povray.org>
Am 25.11.2011 03:59, schrieb H. Karsten:
> Hi people,
> I just wrote a formula-generator for an iso-surface to generate sea-surfaces.
>
> It parameters for the count of waves the size for the biggest and smallest,
> their speed and direction.

Darn good! The ball looks very convincing, too.

Thanks for sharing.


Post a reply to this message

From: Thomas de Groot
Subject: Re: ISO Sea
Date: 25 Nov 2011 03:15:25
Message: <4ecf4e9d@news.povray.org>
On 25-11-2011 3:59, H. Karsten wrote:
> Hi people,
> I just wrote a formula-generator for an iso-surface to generate sea-surfaces.
>
> It parameters for the count of waves the size for the biggest and smallest,
> their speed and direction.
>

Excellent indeed! Very useful; Thanks for sharing this.

One little comment: in RL the ball would also roll a bit and move 
slightly left (when going up) and right (when going down) while going 
over the waves. But that is nitpicking at this stage.

Thomas


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: ISO Sea
Date: 25 Nov 2011 10:33:33
Message: <4ecfb54d$1@news.povray.org>
On 25.11.2011 03:59, H. Karsten wrote:
> Hi people,
> I just wrote a formula-generator for an iso-surface to generate sea-surfaces.
>
> It parameters for the count of waves the size for the biggest and smallest,
> their speed and direction.

Cool, cool, cool! I wish I could dream up a HUGE project to pool our 
efforts... such as Khyberspace or even PoVEarth! Life is too short to 
re-invent the wheel a thousand times...

See you in Khyberspace!

Yadgar


Post a reply to this message

From: H  Karsten
Subject: Re: ISO Sea
Date: 25 Nov 2011 19:00:01
Message: <web.4ed02bf1532f46b7a3bfeb720@news.povray.org>
That just has come into my mind ;)


Post a reply to this message


Attachments:
Download 'earthunder.jpg' (98 KB)

Preview of image 'earthunder.jpg'
earthunder.jpg


 

From: Alain
Subject: Re: ISO Sea
Date: 27 Nov 2011 17:26:48
Message: <4ed2b928@news.povray.org>

> That just has come into my mind ;)

Funy!


Mercury is not dense enough...


Alain


Post a reply to this message

From: H  Karsten
Subject: Re: ISO Sea
Date: 28 Nov 2011 15:55:00
Message: <web.4ed3f43f532f46b7a3bfeb720@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> > That just has come into my mind ;)
>
> Funy!
>

> Mercury is not dense enough...
>
>
> Alain

http://news.povray.org/povray.off-topic/thread/%3C4ebaeec4%40news.povray.org%3E/

;)


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: ISO Sea
Date: 28 Nov 2011 17:29:18
Message: <4ed40b3e$1@news.povray.org>
High!

On 28.11.2011 21:51, H. Karsten wrote:


>> Mercury is not dense enough...


much deeper submerged... so it must be liquid iridium! Or even some 
exotic white dwarf core matter!

See you in Khyberspace!

Yadgar


Post a reply to this message

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