POV-Ray : Newsgroups : povray.general : re media Server Time
4 Nov 2024 21:23:16 EST (-0500)
  re media (Message 1 to 4 of 4)  
From: Mick Hazelgrove
Subject: re media
Date: 17 Jan 1999 06:18:17
Message: <36a1c6f9.0@news.povray.org>
I'm not sure where to post this... here or in bugs...

So I'll post it here


Consider this piece of code render it.. no problems

now change the end vectors of the cylinder to some random positions try
several.

The media does not seem to follow the position/orientation of the
cylinder!!!!

Post transformation and rotation works OK.

I've just spent 2 days creating a spiral of tubes that were to be filled
with media and it don't work... oh hell back to the drawing board.

Mick



#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
}

// ----------------------------------------
camera{location  <0.0, 0.0, -20.0>
       look_at   <0.0, 0.0,  0.0>
}

light_source{<-30, 30, -30>,color rgb<1,1,1>}

// ----------------------------------------
#declare Spark =
cylinder{y*-2,y*2,0.5
 pigment { rgbt 1}
  interior {
    media {
      emission 12
      intervals 20
      samples 20, 20
      confidence 0.9999
      variance 1/1000
          density

              cylindrical
                 turbulence 1.0
                   colour_map {
                      [0 rgb 0]
                      [0.3 rgb <0,0,0.1>]
                      [0.5 rgb <0.15,0,0.25>]
                      [0.7 rgb <0,0,0.5>]
                      [0.8 rgb <0,0.75,0.0>]
                      [0.95 rgb <0,0.75,0.5>]
                      }

           scale <0.35,0.5,0.35>
       }
     }

   }
   hollow
 }

object{Spark scale 1 }


Post a reply to this message

From: Nieminen Mika
Subject: Re: re media
Date: 17 Jan 1999 11:00:28
Message: <36a2091c.0@news.povray.org>
Mick Hazelgrove <mha### [at] mindaswinternetcouk> wrote:
: I'm not sure where to post this... here or in bugs...

: So I'll post it here

  You made the right thing.
  I think this is a kind of de-facto rule, ie. "if you are not sure whether
to post your report to .bugreports or to .general, then post to the latter".

: now change the end vectors of the cylinder to some random positions try
: several.

: The media does not seem to follow the position/orientation of the
: cylinder!!!!

  The media doesn't care what's its container object or what's the shape
of that object. Media is always positioned at the same place. You can only
see the part of the media which is inside the container object.
  Think about it this way:
  Take a sheet of paper and cut a hole in the middle of it. Now cover the
image on your monitor with the paper. You can see part of the image
through the hole. If you move the paper, the image will not move with it,
but you see different parts of the image through the hole. If you enlarge
the hole, the image will not enlarge, but you will see a bigger portion
of the image instead.

: Post transformation and rotation works OK.

  Yes, because those tranformations are applied also to the media.

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

From: Mick Hazelgrove
Subject: Re: re media
Date: 17 Jan 1999 11:01:14
Message: <36a2094a.0@news.povray.org>
Mick Hazelgrove wrote in message <36a1c6f9.0@news.povray.org>...
>I'm not sure where to post this... here or in bugs...


I now realise this is not a bug, merely an irritation!

Does anybody know if it is possible to translate the colour map to the
correct position given only the end vectors of the cylinder?

Mick


Post a reply to this message

From: Nieminen Mika
Subject: Re: re media
Date: 17 Jan 1999 11:08:23
Message: <36a20af7.0@news.povray.org>
Mick Hazelgrove <mha### [at] mindaswinternetcouk> wrote:
: Does anybody know if it is possible to translate the colour map to the
: correct position given only the end vectors of the cylinder?

  It surely is possible. You have to transform (scale, rotate, translate)
the media so that it's in the correct position. You need some mathematics
for this, though.

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

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