returned from-0 value-2 days in-help!

returned from-0 value-2 days in-help!

Post by GChand79 » Sun, 22 Dec 1996 04:00:00



I guess I need some wicked basic help here I may be further along by  the
time you get this, But im just trying to get the hang. I knoe this is the
best thing out there. I dont even want a modeller for it. Got the space
visualized, basic phong ,worked with a few of the included files , no luck
making my own.....returned from renderer.......etc.........

 
 
 

1. POV-Ray 3.1 : Returning a value!

Hi,
OK, I am really pissed off because I can't figure it out...I've RTFM many
times (mainly the sections 4.2.8.4 and 4.2.8.5), and I still can't figure it
out.  I am making a 'plug-in' that requires the use of randomly generated
numbers.  I also wanted them to be negative numbers as well.  So, I created a
macro that would return a +1 or a -1 (randomly)...but I can't figure out how
to have that value returned.  I have something like this:

#macro Sign()
  #local S=seed(clock);
  #local R=rand(S);

  #if(R <= .5)
    1
  #else
   -1
   #end
#end

I don't know if that is right or not, but I hope you can see what I am up to.
I know there is another way to generate random values from -1 to 1
(like: #local R=(rand(S)*2)-1 but just for now, I want to know how to return
values).

BTW, I wonder why POV-Ray Team could've just implemented a #return directive
It would make things really easy...and this shouldn't limit to numbers.

Thanks!
Bye!

Gautam N. Lad / Vimal N. Lad

- Website: http://www.geocities.com/SiliconValley/Heights/1107
- ICQ #7196672

2. Depth values in POV

3. what gversion values can an O2 return?

4. Crosstalk on Flyer?!?

5. max return value ...

6. Please HELP *3DMax problem...

7. Odd return values from LScript Control Objects.

8. 3D Models in games

9. Return-Value of function

10. Values returned from glReadPixels slightly off.

11. Click Return Value

12. Using Z value returned by gluProject

13. MEL-Returning value of variable name