POV-Ray : Newsgroups : povray.newusers : math : Re: math Server Time
6 Sep 2024 12:11:01 EDT (-0400)
  Re: math  
From: Jerry Anning
Date: 11 Apr 1998 00:10:51
Message: <352EED49.E780C35D@dhol.com>
Ross Litscher wrote:

> I have a mathematical equation and I was wondering if it is possible
> to
> do something like put one sphere at each vlaue or something. simple
> example would be y = 3x + 1 or something... and have a while loop with
>
> values from 0 to 10 being put in. how, if possible, would I do this?

   // Begin POV code

#include "colors.inc"
#include "textures.inc"

// Your camera here

// Your lights here

#declare J = 0
#while (J < 11)
    sphere
        { <J, 3 * J + 1, 0>,  .5
            texture { pigment { color Red } normal { dents 3 } finish {
Shiny } } }
    #declare J = J + 1
#end

// End POV code

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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