POV-Ray : Newsgroups : povray.newusers : media setup i don't understand... Server Time
25 Nov 2024 03:42:36 EST (-0500)
  media setup i don't understand... (Message 1 to 7 of 7)  
From: jimmy
Subject: media setup i don't understand...
Date: 1 Sep 2006 19:20:00
Message: <web.44f8bf5f823370943cba71480@news.povray.org>
Hello all,
I need you help with a scene of mine.
Basically i'm trying to modell a "flared" disc of gaz...

The disc is the surface inside a cylinder and between 2 paraboloids...
I fill it with emitting media...

i wanted to tell the code i want more emmiting media to the center of the
disc...i did it with a cylindrical density pattern.

my problem is that bright part of my media is not centered in the disc...it
seems that it has nothing to do with the cylindrical pattern...
i spent many hours trying to understand what i did wrong...i figure it may
be a silly error of mine, but it can also be something i simply did not
understand so i'm requesting your help! :D

i'm looking forward for your advices
jimmy


here's a paste of my scene file:

#include "colors.inc"
#include "functions.inc"
#include "shapes.inc"

//rayons min et max du disque....
#declare r_in = 10;
#declare r_out = 500;


//hauteur min et max du disque
#declare h_min =10;
#declare h_max =80;


//cylinder encompassing the disc
#declare Cube = cylinder{<0,-h_max,0>,<0,h_max,0>,r_out open }  ;




//top and bottom surfaces
#declare top = object{Paraboloid_Y
scale r_out
scale ((h_max-h_min)/r_out)*y
translate h_min*y
}
;

#declare bottom=object{top
rotate 180*x
};





//construction of the flared disc
#declare disque=union{
object{top}
object{bottom}
clipped_by{Cube}
};


#declare Disque=union{
object{Cube}
object{disque}
};




//color map
#declare gradient_disque= color_map{
[0.0 rgb<0.002,0.0,0.0>]

[0.05 rgb<0.03,0.0,0.0>]
[0.1 rgb<0.035,0.0,0.0>]
[0.2 rgb<0.04,0.0,0.0>]
[0.3 rgb<0.05,0.0,0.0>]
[0.4 rgb<0.1,0.0,0.0>]
[0.6 rgb<0.2,0.00,0.00>]
[0.7 rgb<0.3,0.00,0.0>]
[0.8 rgb<0.4,0.0,0.0>]
[0.9 rgb<0.5,0.08,0.0>]
[1.0 rgb<1.0,0.2,0.05>]

}



//object{bottom texture{pigment{color Green}} finish{diffuse 0.6}  }
//object{top texture{pigment{color Green}} finish{diffuse 0.6}  }



//declaration gaz inside the disc
#declare gaz=
interior{
media{
method 3
intervals 1
samples 5
emission 0.01

density{cylindrical scale 500
color_map{gradient_disque}
}

density{wrinkles scale 50
color_map{
[0.0rgb<0.1,0.1,0.1>]
[0.5rgb<0.5,0.5,0.5>]
[1.0rgb<1,1,1>]
}
}

}};


object{Disque
texture {pigment {rgbt 0.5}}
interior{gaz}
hollow}


// perspective (default) camera
camera {location  <000.0, 500.0, -1000.0> look_at   <0.0, 0.0,  0.0>}


//sphere{0,200 pigment{White}}
light_source { <8000,2000,0> rgb 1  }


Post a reply to this message

From: Trevor G Quayle
Subject: Re: media setup i don't understand...
Date: 1 Sep 2006 22:07:12
Message: <44f8e750@news.povray.org>
"jimmy" <nomail@nomail> wrote in message 
news:web.44f8bf5f823370943cba71480@news.povray.org...
> Hello all,
> I need you help with a scene of mine.
> Basically i'm trying to modell a "flared" disc of gaz...
>
> The disc is the surface inside a cylinder and between 2 paraboloids...
> I fill it with emitting media...
>
> i wanted to tell the code i want more emmiting media to the center of the
> disc...i did it with a cylindrical density pattern.
>
> my problem is that bright part of my media is not centered in the 
> disc...it
> seems that it has nothing to do with the cylindrical pattern...
> i spent many hours trying to understand what i did wrong...i figure it may
> be a silly error of mine, but it can also be something i simply did not
> understand so i'm requesting your help! :D
>
> i'm looking forward for your advices
> jimmy
>
>

Not sure what your problem is, but the density is working as should be 
expected.  Try looking from directly above or the side and it is centred 
fine.  I think what you see as off-centred is a result of the angle of view.

-tgq


Post a reply to this message

From: jimmy
Subject: Re: media setup i don't understand...
Date: 2 Sep 2006 08:20:01
Message: <web.44f975e1a5ed894c3cba71480@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> "jimmy" <nomail@nomail> wrote in message
> news:web.44f8bf5f823370943cba71480@news.povray.org...
> > Hello all,
> > I need you help with a scene of mine.
> > Basically i'm trying to modell a "flared" disc of gaz...
> >
> > The disc is the surface inside a cylinder and between 2 paraboloids...
> > I fill it with emitting media...
> >
> > i wanted to tell the code i want more emmiting media to the center of the
> > disc...i did it with a cylindrical density pattern.
> >
> > my problem is that bright part of my media is not centered in the
> > disc...it
> > seems that it has nothing to do with the cylindrical pattern...
> > i spent many hours trying to understand what i did wrong...i figure it may
> > be a silly error of mine, but it can also be something i simply did not
> > understand so i'm requesting your help! :D
> >
> > i'm looking forward for your advices
> > jimmy
> >
> >
>
> Not sure what your problem is, but the density is working as should be
> expected.  Try looking from directly above or the side and it is centred
> fine.  I think what you see as off-centred is a result of the angle of view.
>
> -tgq


Thanks for your answer Trevor.
Yes i saw that face on and edge on the behavior looked fine.
Also  iknew there would be line of sight effect but i estimated they would
not be that big...

i'm confused especially knowing that with a perfect cylinder (Cube in the
code), the media is nicely centered...playing with h_min value i can
transform my flared disc into a cylinder (or very very close
), YET it shows a complete different behaviour from the cylinder...


jimmy


Post a reply to this message

From: Trevor G Quayle
Subject: Re: media setup i don't understand...
Date: 2 Sep 2006 10:33:51
Message: <44f9964f$1@news.povray.org>
> Thanks for your answer Trevor.
> Yes i saw that face on and edge on the behavior looked fine.
> Also  iknew there would be line of sight effect but i estimated they would
> not be that big...
>
> i'm confused especially knowing that with a perfect cylinder (Cube in the
> code), the media is nicely centered...playing with h_min value i can
> transform my flared disc into a cylinder (or very very close
> ), YET it shows a complete different behaviour from the cylinder...
>
>
> jimmy
>
>

I'm also not quite sure how you are constructing your object, especially 
with the 'open' in the cylinder and the 'clipped_by'.  What should the 
object you are trying to construct look like?

-tgq


Post a reply to this message

From: jimmy
Subject: Re: media setup i don't understand...
Date: 2 Sep 2006 11:15:00
Message: <web.44f99a96a5ed894c3cba71480@news.povray.org>
to sum up, a cylinder where the top and the bottom faces has been
incurved...in the shape of a parabol

i did this by putting together 2 paraboloids and a cylinder...


"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> > Thanks for your answer Trevor.
> > Yes i saw that face on and edge on the behavior looked fine.
> > Also  iknew there would be line of sight effect but i estimated they would
> > not be that big...
> >
> > i'm confused especially knowing that with a perfect cylinder (Cube in the
> > code), the media is nicely centered...playing with h_min value i can
> > transform my flared disc into a cylinder (or very very close
> > ), YET it shows a complete different behaviour from the cylinder...
> >
> >
> > jimmy
> >
> >
>
> I'm also not quite sure how you are constructing your object, especially
> with the 'open' in the cylinder and the 'clipped_by'.  What should the
> object you are trying to construct look like?
>
> -tgq


Post a reply to this message

From: Tim Attwood
Subject: Re: media setup i don't understand...
Date: 2 Sep 2006 18:45:33
Message: <44fa098d$1@news.povray.org>
This seems like some sort of bug to me after running
your code. If you add some other object to the scene
it starts behaving normally. Adding...
sphere {<0,-10000,0>,1 pigment{White}}
and increasing the emission to 0.05 looks OK.

It has something to do with the way you made the
object as well, since...

#declare Disk2 = difference {
   object{Cube}
   object{top}
   object{bottom}
};
object{ Disk2 //Disque
etc

Also looks ok, as the only object in the scene.
Somehow when a ray is cast at Disque it isn't
finding any other objects so it looks different,
probably exits early out of some calculation.


Post a reply to this message

From: Abe
Subject: Re: media setup i don't understand...
Date: 2 Sep 2006 21:05:00
Message: <web.44fa26a8a5ed894ca848f9dd0@news.povray.org>
Does replacing

--------code---------
#declare disque=union{
object{top}
object{bottom}
clipped_by{Cube}
};


#declare Disque=union{
object{Cube}
object{disque}
};
------end code-------

with


--------code---------
#declare Disque=difference{
object{Cube}
object{top}
object{bottom}
};
------end code-------

produce what you want?

Abe

"jimmy" <nomail@nomail> wrote:
> Hello all,
> I need you help with a scene of mine.
> Basically i'm trying to modell a "flared" disc of gaz...
>
> The disc is the surface inside a cylinder and between 2 paraboloids...
> I fill it with emitting media...
>
> i wanted to tell the code i want more emmiting media to the center of the
> disc...i did it with a cylindrical density pattern.
>
> my problem is that bright part of my media is not centered in the disc...it
> seems that it has nothing to do with the cylindrical pattern...
> i spent many hours trying to understand what i did wrong...i figure it may
> be a silly error of mine, but it can also be something i simply did not
> understand so i'm requesting your help! :D
>
> i'm looking forward for your advices
> jimmy
>
>
> here's a paste of my scene file:
>
> #include "colors.inc"
> #include "functions.inc"
> #include "shapes.inc"
>
> //rayons min et max du disque....
> #declare r_in = 10;
> #declare r_out = 500;
>
>
> //hauteur min et max du disque
> #declare h_min =10;
> #declare h_max =80;
>
>
> //cylinder encompassing the disc
> #declare Cube = cylinder{<0,-h_max,0>,<0,h_max,0>,r_out open }  ;
>
>
>
>
> //top and bottom surfaces
> #declare top = object{Paraboloid_Y
> scale r_out
> scale ((h_max-h_min)/r_out)*y
> translate h_min*y
> }
> ;
>
> #declare bottom=object{top
> rotate 180*x
> };
>
>
>
>
>
> //construction of the flared disc
> #declare disque=union{
> object{top}
> object{bottom}
> clipped_by{Cube}
> };
>
>
> #declare Disque=union{
> object{Cube}
> object{disque}
> };
>
>
>
>
> //color map
> #declare gradient_disque= color_map{
> [0.0 rgb<0.002,0.0,0.0>]
>
> [0.05 rgb<0.03,0.0,0.0>]
> [0.1 rgb<0.035,0.0,0.0>]
> [0.2 rgb<0.04,0.0,0.0>]
> [0.3 rgb<0.05,0.0,0.0>]
> [0.4 rgb<0.1,0.0,0.0>]
> [0.6 rgb<0.2,0.00,0.00>]
> [0.7 rgb<0.3,0.00,0.0>]
> [0.8 rgb<0.4,0.0,0.0>]
> [0.9 rgb<0.5,0.08,0.0>]
> [1.0 rgb<1.0,0.2,0.05>]
>
> }
>
>
>
> //object{bottom texture{pigment{color Green}} finish{diffuse 0.6}  }
> //object{top texture{pigment{color Green}} finish{diffuse 0.6}  }
>
>
>
> //declaration gaz inside the disc
> #declare gaz=
> interior{
> media{
> method 3
> intervals 1
> samples 5
> emission 0.01
>
> density{cylindrical scale 500
> color_map{gradient_disque}
> }
>
> density{wrinkles scale 50
> color_map{
> [0.0rgb<0.1,0.1,0.1>]
> [0.5rgb<0.5,0.5,0.5>]
> [1.0rgb<1,1,1>]
> }
> }
>
> }};
>
>
> object{Disque
> texture {pigment {rgbt 0.5}}
> interior{gaz}
> hollow}
>
>
> // perspective (default) camera
> camera {location  <000.0, 500.0, -1000.0> look_at   <0.0, 0.0,  0.0>}
>
>
> //sphere{0,200 pigment{White}}
> light_source { <8000,2000,0> rgb 1  }


Post a reply to this message

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