POV-Ray : Newsgroups : povray.binaries.images : Toroidal media Server Time
20 Apr 2024 05:44:21 EDT (-0400)
  Toroidal media (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Le Forgeron
Subject: Toroidal media
Date: 6 Dec 2014 15:01:35
Message: <5483609f@news.povray.org>
It started from a question in p.advanced-users.

Original source from portfolio allpattern.pov for cylindrical

#version 3.7;
global_settings {
  assumed_gamma 1.0
}

#include "colors.inc"


#declare Cylindrical   = pigment {cylindrical colour_map {[0, rgb 0][1,
rgb 1]}scale 0.8}


         box {
            -1.5,1.5
            hollow
            material {
               texture {
                  pigment {rgbf 1}
                  finish {
                     ambient 0
                     diffuse 0
                  }
               }
               interior {
                  media {
                     emission 0.3
                     samples 40,40
                     intervals 40
                     method 2
                     density {
                        cylindrical
                        color_map {
                           [0, rgb 0]
                           [0, rgb <0.5,0.5,0.4>]
                           [1, rgb <1,0,0>]
                        }
	rotate 90*z
	scale 4/7 //control minor radius
                        warp
						{
                          toroidal  orientation z major_radius 1
						}
                     }
                  }
               }
            }
            rotate <0,-35,0>
            rotate <-25,0,0>
            translate<0,0,-1.5>
         }

   camera {
     right x*image_width/image_height
     location  <0,0,-8>
     look_at   <0,-0.25, 0>
     angle 35
   }
   light_source{<500,10,-500> rgb 1}
   light_source{<-500,500,-500> rgb <0.6,0.6,0.8>}

-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message


Attachments:
Download 'tm.png' (124 KB)

Preview of image 'tm.png'
tm.png


 

From: Thomas de Groot
Subject: Re: Toroidal media
Date: 7 Dec 2014 03:41:40
Message: <548412c4@news.povray.org>
Close, but not quite. Look at image: the torus is not complete.

Thomas


Post a reply to this message


Attachments:
Download 'torusmedia_test.png' (205 KB)

Preview of image 'torusmedia_test.png'
torusmedia_test.png


 

From: Thomas de Groot
Subject: Re: Toroidal media
Date: 7 Dec 2014 04:24:32
Message: <54841cd0@news.povray.org>
The best way to achieve my initial question in p.advanced-users is the 
solution given by Alain: using a torus function for the density:

#local Radius = 30;
#local F_pig = pigment {function {f_torus(x,y,z, 1.0, 0.15)}};

torus {1.0, 0.15
   hollow
   material {
     texture {
       pigment {rgbt 1}
     }
     interior {
       media {
         intervals 1
         samples 10
         emission 0.5/Radius
         density {
           pigment_pattern {F_pig}
           color_map {
             [0.8 rgb <0,1,0>]
             [1.0 rgb <1,0,0>]
           }
         }
       }
     }
   }
   scale Radius
   rotate 10*x
   rotate 15*z
}


Now, I need to investigate further in combining this with toroidal warps 
and other media matter. My ultimate goal is to achieve a credible Milky 
Way that can be seen from a planet for instance.

Thomas


Post a reply to this message


Attachments:
Download 'planetgenesis.png' (191 KB)

Preview of image 'planetgenesis.png'
planetgenesis.png


 

From: Le Forgeron
Subject: Re: Toroidal media
Date: 7 Dec 2014 05:25:28
Message: <54842b18@news.povray.org>
On 07/12/2014 09:41, Thomas de Groot wrote:
> Close, but not quite. Look at image: the torus is not complete.
> 
> Thomas
> 
Yep, you are right, it's wrapping the media around the torus, not what
you expected.

So, I'm calling the hgpovray branch to the rescue.

http://wiki.povray.org/content/User:Le_Forgeron#torus

The inverse of the minor radius/scale is used as parameter.



box { -1.5,1.5 hollow material { texture { pigment {rgbf 1} finish {
ambient 0 diffuse 0 } } interior { media { emission 0.3 samples 40,40
intervals
40 method 2 density { cylindrical color_map
{ [0, rgb 0]
[0, rgb <0.5,0.5,0.4>]
[1, rgb <1,0,0>] }
 warp { torus <0,0,0>, 1, <7/4,1,0>
 } } } } }
   }


-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message


Attachments:
Download 'tm.png' (100 KB)

Preview of image 'tm.png'
tm.png


 

From: Thomas de Groot
Subject: Re: Toroidal media
Date: 7 Dec 2014 07:19:25
Message: <548445cd$1@news.povray.org>
On 7-12-2014 11:25, Le_Forgeron wrote:
> On 07/12/2014 09:41, Thomas de Groot wrote:
>> Close, but not quite. Look at image: the torus is not complete.
>>
>> Thomas
>>
> Yep, you are right, it's wrapping the media around the torus, not what
> you expected.
>
> So, I'm calling the hgpovray branch to the rescue.
>
> http://wiki.povray.org/content/User:Le_Forgeron#torus
>
> The inverse of the minor radius/scale is used as parameter.
>
>
>
> box { -1.5,1.5 hollow material { texture { pigment {rgbf 1} finish {
> ambient 0 diffuse 0 } } interior { media { emission 0.3 samples 40,40
> intervals
> 40 method 2 density { cylindrical color_map
> { [0, rgb 0]
> [0, rgb <0.5,0.5,0.4>]
> [1, rgb <1,0,0>] }
>   warp { torus <0,0,0>, 1, <7/4,1,0>
>   } } } } }
>     }
>
>

Excellent! So we have two methods now to choose from.

However, your warp code is not implemented in the latest version 3.7!

Thomas


Post a reply to this message

From: Le Forgeron
Subject: Re: Toroidal media
Date: 7 Dec 2014 12:28:19
Message: <54848e33@news.povray.org>
On 07/12/2014 13:19, Thomas de Groot wrote:

> 
> Excellent! So we have two methods now to choose from.
> 
> However, your warp code is not implemented in the latest version 3.7!
> 
> Thomas
> 

For a solution based on toroidal (original post), the solution is with
dist_exp 200 (or any big enough value) to neglect the effect of depth,
or changing the cylindrical to a pigment that has no influence due to
depth , value 1 at 0, value 0 at -1 and 1: it's planar !!!

so either : 		


 box { -1.5,1.5 hollow material { texture { pigment {rgbf 1} finish {
ambient 0 diffuse 0 } } interior { media { emission 0.3 samples 40,40
intervals
40 method 2 density { planar
color_map
{ [0, rgb 0]
[0, rgb <0.5,0.5,0.4>]
[1, rgb <1,0,0>] }
scale 4/7
 warp { toroidal orientation y major_radius 1
 } } } } }
   }

or

 box { -1.5,1.5 hollow material { texture { pigment {rgbf 1} finish {
ambient 0 diffuse 0 } } interior { media { emission 0.3 samples 40,40
intervals
40 method 2 density { cylindrical
color_map
{ [0, rgb 0]
[0, rgb <0.5,0.5,0.4>]
[1, rgb <1,0,0>] }
rotate 90*z
scale 4/7
 warp { toroidal orientation z major_radius 1 dist_exp 200
 } } } } }
   }

Strictly speaking, dist_exp is cheating. Planar is not.

-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message


Attachments:
Download 'pla.png' (100 KB) Download 'tm.png' (100 KB)

Preview of image 'pla.png'
pla.png

Preview of image 'tm.png'
tm.png


 

From: Alain
Subject: Re: Toroidal media
Date: 7 Dec 2014 14:09:21
Message: <5484a5e1$1@news.povray.org>
Le 14-12-07 04:24, Thomas de Groot a écrit :
> The best way to achieve my initial question in p.advanced-users is the
> solution given by Alain: using a torus function for the density:
>
> #local Radius = 30;
> #local F_pig = pigment {function {f_torus(x,y,z, 1.0, 0.15)}};
>
> torus {1.0, 0.15
>    hollow
>    material {
>      texture {
>        pigment {rgbt 1}
>      }
>      interior {
>        media {
>          intervals 1
>          samples 10
>          emission 0.5/Radius
>          density {
>            pigment_pattern {F_pig}
>            color_map {
>              [0.8 rgb <0,1,0>]
>              [1.0 rgb <1,0,0>]
>            }
>          }
>        }
>      }
>    }
>    scale Radius
>    rotate 10*x
>    rotate 15*z
> }
>
>
> Now, I need to investigate further in combining this with toroidal warps
> and other media matter. My ultimate goal is to achieve a credible Milky
> Way that can be seen from a planet for instance.
>
> Thomas

The milky way is not toroidal but a barred spiral that is thicker in the 
center and tapper off toward the edges in a lenticular way.
A combination of spherical, with uneven scalling for the central bulge, 
and turbulated planar could be the best way to do it.

Alain


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Toroidal media
Date: 7 Dec 2014 17:11:02
Message: <5484d076$1@news.povray.org>
On 07.12.2014 20:09, Alain wrote:

> A combination of spherical, with uneven scalling for the central bulge,
> and turbulated planar could be the best way to do it.

The spiral1 pattern may also be useful for this purpose.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Toroidal media
Date: 8 Dec 2014 03:16:39
Message: <54855e67@news.povray.org>
On 7-12-2014 23:11, Christian Froeschlin wrote:
> On 07.12.2014 20:09, Alain wrote:
>
>> A combination of spherical, with uneven scalling for the central bulge,
>> and turbulated planar could be the best way to do it.
>
> The spiral1 pattern may also be useful for this purpose.

Well, as you realize, seen from a planet's surface, the basic shape is 
not really important. I could also just use a cylinder or a box within 
the camera view ;-)

However, I want to go a little bit further than just that make-believe 
and so came up with a torus. Btw, Nekar's spiral galaxy in the Objects 
Collection might also be a possibility to investigate.

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Toroidal media
Date: 8 Dec 2014 03:20:11
Message: <54855f3b@news.povray.org>
On 7-12-2014 18:28, Le_Forgeron wrote:
> For a solution based on toroidal (original post), the solution is with
> dist_exp 200 (or any big enough value) to neglect the effect of depth,
> or changing the cylindrical to a pigment that has no influence due to
> depth , value 1 at 0, value 0 at -1 and 1: it's planar !!!
 >
[snip]
 >
 > Strictly speaking, dist_exp is cheating. Planar is not.
 >

Interesting. I wondered how to use dist_exp as the docs are not very 
clear on that issue and I did not know what it really represented.

Thanks indeed

Thomas


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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