POV-Ray : Newsgroups : povray.general : parallel planes to make an event horizon Server Time
28 Dec 2024 21:25:09 EST (-0500)
  parallel planes to make an event horizon (Message 1 to 9 of 9)  
From: skippy
Subject: parallel planes to make an event horizon
Date: 25 May 2014 02:00:08
Message: <web.538186a16ccab12869944c250@news.povray.org>
Is it possible to have 2 parallel planes with the light source and camera
between them? So that it would look like a horizon, with the plane above meeting
the plane below off in the distance.

I've tried variations of this code:
plane { <0, 1, 0>, -1
 pigment {
  checker color Red, color Blue
 }
 texture { T_Stone25 scale 4 }
}

plane { <0, -1, 0>, -7
 pigment {
  checker color Blue, color Green
 }
 texture { T_Stone25 scale 4 }
}

Thinking the normals of the planes would be opposing each other (hence y is 1
for bottom plane and -1 for top plane). Reference says the distance value is how
far along the normal from the origin. So if the normal is going y-negative, I'd
need a negative number to bring the plane back 'up' above the camera and light
source.

But I can't seem to make this idea work. Suggestions?


Post a reply to this message

From: Thomas de Groot
Subject: Re: parallel planes to make an event horizon
Date: 25 May 2014 03:19:29
Message: <53819981$1@news.povray.org>
On 25-5-2014 7:58, skippy wrote:
> Thinking the normals of the planes would be opposing each other (hence y is 1
> for bottom plane and -1 for top plane). Reference says the distance value is how
> far along the normal from the origin. So if the normal is going y-negative, I'd
> need a negative number to bring the plane back 'up' above the camera and light
> source.
>
> But I can't seem to make this idea work. Suggestions?
>
>

Your normals are correct, however, you interpret wrongly the distance of 
the plane to the origin. -1 and -7 mean that the planes are positioned 
at -1 and -7 from the origin along the y-axis, irrespective of the 
normal /orientation/. If your camera and light are placed at y=0 for 
instance, you can place the planes at:

plane {<0, 1, 0>, -1}
plane {<0,-1, 0>, 7}

for the effect you are after.

Note that planes have no thickness, so normal orientation is irrelevant 
in your example, except if you want to use a media in between the planes.

Thomas


Post a reply to this message

From: Stephen
Subject: Re: parallel planes to make an event horizon
Date: 25 May 2014 04:02:13
Message: <5381a385$1@news.povray.org>
On 25/05/2014 06:58, skippy wrote:
> Is it possible to have 2 parallel planes with the light source and camera
> between them? So that it would look like a horizon, with the plane above meeting
> the plane below off in the distance.
>
> I've tried variations of this code:
> plane { <0, 1, 0>, -1
>   pigment {
>    checker color Red, color Blue
>   }
>   texture { T_Stone25 scale 4 }
> }
>
> plane { <0, -1, 0>, -7
>   pigment {
>    checker color Blue, color Green
>   }
>   texture { T_Stone25 scale 4 }
> }
>
> Thinking the normals of the planes would be opposing each other (hence y is 1
> for bottom plane and -1 for top plane). Reference says the distance value is how
> far along the normal from the origin. So if the normal is going y-negative, I'd
> need a negative number to bring the plane back 'up' above the camera and light
> source.
>
> But I can't seem to make this idea work. Suggestions?
>
>

Normals aside. What are you trying to do with your textures?
When I ran your code (added a camera and light source) I got what you 
wanted.
You will need to use a finish with a high ambient value to see to the 
meeting point.
If you are using layered textures the top one must have a degree of 
transparency for the lower ones to be seen.
So I would start off with a simple texture for my planes and work up 
from there.

Try the scene below but don't use my coding as a good example as it is 
machine written. You will need to use high Anti-Aliasing settings.

#version 3.7; // Insert the version of povray here

background { colour rgb <0.000,0.000,0.000> }
#declare Texture1 =
texture {
   pigment {
     hexagon
     colour rgbft <1.000,0.000,0.000,0.000,0.000>
     colour rgbft <0.000,1.000,0.000,0.000,0.000>
     colour rgbft <0.000,0.000,1.000,0.000,0.000>
   }

   finish {
     ambient     rgb <0.753,0.753,0.753>
     brilliance  1.000
     crand       0.000
     diffuse     0.600
     metallic    0.000
     phong       0.000
     phong_size  40.000
     specular    0.000
     roughness   0.050
   }

}

#declare Camera0 =
camera {
   perspective
   location <-52.428,2.000,0.000>
   up y
   right -1.333*x
   angle 33.000
   sky <0.000,1.000,0.000>
   look_at < 40.000, 2.000, 0.000 >
}  // end Camera0

light_source {  // Light_Source0
   < 0.000000, 0.000000, 0.000000 >, colour rgb <1.000,1.000,1.000>*2.000
   fade_power 0.000
   fade_distance 100.000
   media_attenuation off
   media_interaction on
   translate <47.366000,6.668002,16.100000>
}  // end Light_Source0

plane {  // Plane0
   y , 0
   translate <-0.000000,-1.000000,-0.000000>
   texture{ Texture1 }
   translate <0.000000,1.000000,0.000000>
   translate <0.000000,-1.000000,0.000000>
}  // end Plane0

plane {  // Plane1
   y , 0
   translate <0.000000,-7.000000,-0.000000>
   rotate    <0.0,0.0,180.000000>
   texture{ Texture1 }
   rotate    <0.000000,0.000000,-180.000000>
   translate <-0.000000,7.000000,0.000000>
   rotate    <0.000000,0.000000,180.000000>
   translate <0.000000,7.000000,0.000000>
}  // end Plane1


camera{ Camera0 }

-- 

Regards
     Stephen


Post a reply to this message

From: skippy
Subject: Re: parallel planes to make an event horizon
Date: 25 May 2014 12:10:01
Message: <web.538214f2cd5be26469944c250@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 25-5-2014 7:58, skippy wrote:
> > Thinking the normals of the planes would be opposing each other (hence y is 1
> > for bottom plane and -1 for top plane). Reference says the distance value is how
> > far along the normal from the origin. So if the normal is going y-negative, I'd
> > need a negative number to bring the plane back 'up' above the camera and light
> > source.
> >
> > But I can't seem to make this idea work. Suggestions?
> >
> >
>
> Your normals are correct, however, you interpret wrongly the distance of
> the plane to the origin. -1 and -7 mean that the planes are positioned
> at -1 and -7 from the origin along the y-axis, irrespective of the
> normal /orientation/.

Thank you for that clarification. After reading the Doc reference I still wasn't
sure.

> If your camera and light are placed at y=0 for
> instance, you can place the planes at:
>
> plane {<0, 1, 0>, -1}
> plane {<0,-1, 0>, 7}
>
> for the effect you are after.
>
> Note that planes have no thickness, so normal orientation is irrelevant
> in your example, except if you want to use a media in between the planes.
>

I understand that planes have no thickness and thought the normal orientation
was important - but wasn't thinking about its effect on texture or media.
After reading the Doc reference paragraph on planes in regards to
"inside/outside" and normal direction, I thought the orientation of the planes'
normals would affect whether the plane was even *visible* (in combination with
camera and light source - of course).
However I've read that section multiple times and still don't quite get it.
Guess I need to take baby steps and hope for enlightenment in the future.


Post a reply to this message

From: skippy
Subject: Re: parallel planes to make an event horizon
Date: 25 May 2014 12:15:00
Message: <web.53821673cd5be26469944c250@news.povray.org>
> Normals aside. What are you trying to do with your textures?
> When I ran your code (added a camera and light source) I got what you
> wanted.
> You will need to use a finish with a high ambient value to see to the
> meeting point.
> If you are using layered textures the top one must have a degree of
> transparency for the lower ones to be seen.
> So I would start off with a simple texture for my planes and work up
> from there.
>
> Try the scene below but don't use my coding as a good example as it is
> machine written. You will need to use high Anti-Aliasing settings.
>
> Regards
>      Stephen

I did try your code and it does demonstrate the principle of my idea - thank you
for that. (My wife made me close the image - made her dizzy! :)  )

I definitely have a lot more reading and learning ahead of me.

As an aside - what tool are you using to auto-generate povray code?


Post a reply to this message

From: Stephen
Subject: Re: parallel planes to make an event horizon
Date: 25 May 2014 13:12:42
Message: <5382248a$1@news.povray.org>
On 25/05/2014 17:13, skippy wrote:
> I did try your code and it does demonstrate the principle of my idea - thank you

Of course it is sound.

> for that. (My wife made me close the image - made her dizzy!:)   )
>

A weapon in your armoury. ;-)
I once made an animation of an eyeball on a pillar. With the pupil 
dilating. My wife still says that it is the one animation that she hates.

> I definitely have a lot more reading and learning ahead of me.
>
As do we all. :-)

> As an aside - what tool are you using to auto-generate povray code?

It is Bishop3D. But I would not recommend it any more. :-)
It is not free (was to me as I was a tester and got it free). More 
importantly the developer has, I fear. Gone to the Great Rendering 
Engine in the Sky. He has not been seen for years. And there is no support.
If you do want help with it. I and possibly StephenS would help.
There is also Moray but that too is not being developed.
Moray (free) works with Pov 3.5 and Bishop3D with 3.6. Although both 
export code that can be modified.
I find that they help me visualise the scenes I make.
There is an ongoing project with Blender that renders using PovRay. That 
is mesh based not CSG.


-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: parallel planes to make an event horizon
Date: 26 May 2014 03:16:46
Message: <5382ea5e$1@news.povray.org>
On 25-5-2014 18:06, skippy wrote:

> I understand that planes have no thickness and thought the normal orientation
> was important - but wasn't thinking about its effect on texture or media.
> After reading the Doc reference paragraph on planes in regards to
> "inside/outside" and normal direction, I thought the orientation of the planes'
> normals would affect whether the plane was even *visible* (in combination with
> camera and light source - of course).
> However I've read that section multiple times and still don't quite get it.
> Guess I need to take baby steps and hope for enlightenment in the future.
>
>
In addition to the use of media, the normals are important when you use 
planes in difference or intersection transformations. For instance:

difference {
   box {-1, 1}
   plane {<0, 1, 0>, 0 rotate 45*z}
}

will cut off the lower right-hand part of the box, while

difference {
   box {-1, 1}
   plane {<0, -1, 0>, 0 rotate 45*z}
}

will cut off the upper left-hand part.

To help me visualise a plane's orientation I often consider it as an 
infinite box of which for instance only the upper face (normal +y) or 
the lower face (normal -y) is visible.

Thomas


Post a reply to this message

From: clipka
Subject: Re: parallel planes to make an event horizon
Date: 26 May 2014 13:09:30
Message: <5383754a$1@news.povray.org>
Am 25.05.2014 09:19, schrieb Thomas de Groot:
> On 25-5-2014 7:58, skippy wrote:
>> Thinking the normals of the planes would be opposing each other (hence
>> y is 1
>> for bottom plane and -1 for top plane). Reference says the distance
>> value is how
>> far along the normal from the origin. So if the normal is going
>> y-negative, I'd
>> need a negative number to bring the plane back 'up' above the camera
>> and light
>> source.
>>
>> But I can't seem to make this idea work. Suggestions?
>>
>>
>
> Your normals are correct, however, you interpret wrongly the distance of
> the plane to the origin. -1 and -7 mean that the planes are positioned
> at -1 and -7 from the origin along the y-axis, irrespective of the
> normal /orientation/.

No Thomas, you're wrong there; the value does state a transition along 
the normal vector. The statement

     plane { <X,Y,Z>, D }

is equivalent to:

     plane { <X,Y,Z>, 0  translate <X,Y,Z>*D }


(This, by the way, is equivalent to saying that D specifies the 
(shortes) distance between the origin and the plane, with negative 
values indicating that the origin is on the "outside" of the plane, 
while positive values indicate that it is "inside".)


Thus, the plane

     plane { <0,1,0>, -1 }

passes through <0,-1,0>, while the plane

     plane { <0,-1,0>, -7 }

passes through <0,7,0>.


Post a reply to this message

From: Thomas de Groot
Subject: Re: parallel planes to make an event horizon
Date: 27 May 2014 03:20:44
Message: <53843ccc$1@news.povray.org>
On 26-5-2014 19:09, clipka wrote:
> No Thomas, you're wrong there;  [snip]
> Thus, the plane
>
>      plane { <0,1,0>, -1 }
>
> passes through <0,-1,0>, while the plane
>
>      plane { <0,-1,0>, -7 }
>
> passes through <0,7,0>.
>

Holy Molly! I abase myself. Can you believe that I never, never, have 
been aware of that??

Which shows that one constantly needs to learn, /and/ that one needs to 
read the docs /carefully/ :-)

Thanks Christoph! You illuminated my day!

Thomas


Post a reply to this message

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