POV-Ray : Newsgroups : povray.newusers : I Need Help With Media : Re: I Need Help With Media (small sample image) Server Time
30 Jul 2024 12:22:56 EDT (-0400)
  Re: I Need Help With Media (small sample image)  
From: Alain
Date: 16 May 2004 09:25:54
Message: <40a76be2@news.povray.org>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body vlink="#551a8b" alink="#ee0000" link="#0000ee" text="#330000"
 bgcolor="#cccccc">
Danny nous apporta ses lumieres ainsi en ce 2004/05/15 17:26... : <br>
<blockquote cite="midweb.40a68af75c9adbfeffb015460@news.povray.org"
 type="cite">
  <pre wrap="">I'm trying to create a cylindrical laser that's white in the center,
fades
to red, and then fades to nothing at the edges so that it has a fuzzy
boundary.  I know I need to use media, but I don't know what any of the
media terms do, so could anybody tell me which of them could help me?

  </pre>
</blockquote>
Use a cylindrical pattern for your media enclosed in a long containing
cylinder. Then, assign it a color_map, 1 for the center, 0 for the
edge. It could look like this:<br>
///////////////////////////////////////////////<br>
cylinder{0,1,<0,1000,0>,1 texture{pigment{rgbt 1}}//invisible
enclosing shape<br>
    interior{<br>
        media {emission rgb 1 //make it an emissive,
luminous media<br>
                 
   density{ cylindrical<br>
               
        color_map{[0 rgb 0][0.5 rgb<1,0,0>][0.98
rgb 1][1 rgb 2]}<br>
// Nothing outside, fade to pure red at mid point then to white then
double bright white at the very center<br>
                }<br>
          }<br>
       }<br>
    hollow   // VERY IMPORTENT, if not present, the media
will disapears<br>
    rotate<anglex,angley,anglez>// to orient your "beam" any way
you like<br>
    translate<x,y,z> // to place it exactly where you want it to
go.<br>
    }<br>
///////////////////////////////////////////////<br>
By having one end of the shape at 0 make it easier to correctly orient
and place it, it rotate around that point.<br>
It should looks best using ratiosity, as it will effectively emit light.<br>
<img height="90" width="144" alt=""
 src="cid:par### [at] qwertygov"><br>
Alain<br>
</body>
</html>


Post a reply to this message


Attachments:
Download 'test.jpg' (2 KB)

Preview of image 'test.jpg'
test.jpg


 

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