POV-Ray : Newsgroups : povray.general : The question about of projected through option : Re: The question about of projected through option Server Time
24 Apr 2024 20:35:56 EDT (-0400)
  Re: The question about of projected through option  
From: Stephen
Date: 15 Dec 2017 10:17:11
Message: <5a33e777$1@news.povray.org>
Hello Masaki

And welcome


On 15/12/2017 12:25, Masaki  wrote:
> There are two things I want you to ask for a favor.
> 
> I want to make the light source, which is positioned randomly between y=0~1 and
> emits the light at the specific angle, 45 degrees. The light beam forms the
> conical surface.
> (Q1) Can I make this light source ?
> 

Use a spotlight with the parallel keyword


> I conceive that if the light through the torus (or the disk) is only rendering,
> the above requirement can meet. So, I write the source code as follows, but the
> pov-ray dose not work properly. It seems to be wrong with the "projected
> through" option.
> (Q2) What is wrong in my source code and how to  revise it ?
> 
> 

To start with you need something for the light to shine on. So put a 
plane with a texture in your scene. Below your camera so the light 
shines on it.
When testing set your variable Number to 1. Also it is good practice to 
capitalise your variables so they will not conflict with PovRay's own 
variables.
Pull your camera back or use a wide angle to get a wider view.

I don't want to confuse things by supplying code as I use Left Handed 
scenes with Y up. And changing coordinate systems confuses me.

But when I imported your scene into a modelling program. It looked like 
you camera was pointing the wrong way if the plane was through the origin.






> The pov-ray version is 3.7.
> 
> source code:
> *********************************************
> #include "colors.inc"
> #include "textures.inc"
> 
> background{Black}
> 
> camera {
> 
>      location <0, -1, 0>
>      right <-1.33, 0, 0>
>      angle 40
>      look_at <0, 0.5, 0>
>    }
> 
> 
>   //Source
> 
>   #declare r2 = seed(12345);
>   #declare I = 0;
>   #declare number = 10;
> 
> 
> 
>   #while (I < number)
> 
>   #declare a = rand(r2);
> 
>   #declare Object1 = torus {
>                              0.1, 0.05
> 
>                              sturm
>                              translate <0, a-0.1, 0>
> 
>   }
> 
> 
>   light_source {
> 
>          <0, a, 0>
>          color 100000
>          projected_through {Object1}
> 
>          }
> 
> 
> 
> #declare I = I+1;
> #end
> 
>   *********************************************
> 
> 
> Sincerely,
> Masaki Yoneyama.
> 
> 


-- 

Regards
     Stephen


Post a reply to this message

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