POV-Ray : Newsgroups : povray.newusers : Scene enquiry Server Time
23 Nov 2024 07:52:00 EST (-0500)
  Scene enquiry (Message 1 to 5 of 5)  
From: santividal
Subject: Scene enquiry
Date: 19 Oct 2022 12:40:01
Message: <web.63502844e522bd3bdd71315024a2c7df@news.povray.org>
Him I am trying to replicate this water droplets all around the tap, so maybe a
series of droplets every 12 or 24 degrees around z axis. How should I do. that?
I know it is a beginner trick, but I am trying different #while sentences and it
doesn't seem to work out. Could somebody help me? Here is the code I am using to
achieve the droplets look like a trajectory.

Thanks in advance for any help,


// FUENTE SUPERIOR

#declare posX = 0.02;
#declare posY = 0.82;
#declare dy = 0.055;
#declare posZ=0;
#declare posZ= <0,0,posZ+12>;


    #while (posX < 0.3)
    sphere {
    <posX,posY,0>, 0.01
    material { agua }  }
    #declare dy = dy - 0.01;
    #declare posX = posX + 0.02;
    #declare posY = (posY + dy);
    #end


Post a reply to this message


Attachments:
Download 'fuenteee.png' (2682 KB)

Preview of image 'fuenteee.png'
fuenteee.png


 

From: Bald Eagle
Subject: Re: Scene enquiry
Date: 19 Oct 2022 13:25:00
Message: <web.635032bd984692c41f9dae3025979125@news.povray.org>
I think if you look at code used to model the physics of a falling object, or
better yet, a bouncing ball - you will get the deceleration on the upward
"bounce" and the acceleration on the subsequent fall.


Attached, find a scene I wrote to do the bouncing ball, hope it helps - ask if
you have any questions.


Post a reply to this message


Attachments:
Download 'bouncingball.pov.txt' (7 KB)

From: m@b
Subject: Re: Scene enquiry
Date: 19 Oct 2022 13:27:27
Message: <6350337f@news.povray.org>
On 19/10/2022 5:39 PM, santividal wrote:
> Him I am trying to replicate this water droplets all around the tap, so maybe a
> series of droplets every 12 or 24 degrees around z axis. How should I do. that?
> I know it is a beginner trick, but I am trying different #while sentences and it
> doesn't seem to work out. Could somebody help me? Here is the code I am using to
> achieve the droplets look like a trajectory.
> 
> Thanks in advance for any help,
> 
> 
> // FUENTE SUPERIOR
> 
> #declare posX = 0.02;
> #declare posY = 0.82;
> #declare dy = 0.055;
> #declare posZ=0;
> #declare posZ= <0,0,posZ+12>;
> 
> 
>      #while (posX < 0.3)
>      sphere {
>      <posX,posY,0>, 0.01
>      material { agua }  }
>      #declare dy = dy - 0.01;
>      #declare posX = posX + 0.02;
>      #declare posY = (posY + dy);
>      #end
> 
> 


#declare Rotation=0;
#declare Rotation_angle=12;

#while (Rotation < 360)
     #declare posX = 0.02;
     #declare posY = 0.82;
     #declare dy = 0.055;
     #while (posX < 0.3)
         sphere {
         <posX,posY,0>, 0.01
         // material { agua }
         rotate<0,Rotation,0>
         }
         #declare dy = dy - 0.01;
         #declare posX = posX + 0.02;
         #declare posY = (posY + dy);
     #end
     #declare Rotation = (Rotation + Rotation_angle);
#end


Post a reply to this message

From: santividal
Subject: Re: Scene enquiry
Date: 20 Oct 2022 06:00:00
Message: <web.63511b77984692c4dd71315024a2c7df@news.povray.org>
Thank you so much m@b, that was exactly what I was looking for. What if I wanted
to continue drawing my droplets in the lower level of the fountain? Where should
I declare the distance from the Y axis so that the droplets appear as a
continuation of the upper level?

Thank you in advance for any help


"m@b" <sai### [at] googlemailcom> wrote:
> On 19/10/2022 5:39 PM, santividal wrote:
> > Him I am trying to replicate this water droplets all around the tap, so maybe a
> > series of droplets every 12 or 24 degrees around z axis. How should I do. that?
> > I know it is a beginner trick, but I am trying different #while sentences and it
> > doesn't seem to work out. Could somebody help me? Here is the code I am using to
> > achieve the droplets look like a trajectory.
> >
> > Thanks in advance for any help,
> >
> >
> > // FUENTE SUPERIOR
> >
> > #declare posX = 0.02;
> > #declare posY = 0.82;
> > #declare dy = 0.055;
> > #declare posZ=0;
> > #declare posZ= <0,0,posZ+12>;
> >
> >
> >      #while (posX < 0.3)
> >      sphere {
> >      <posX,posY,0>, 0.01
> >      material { agua }  }
> >      #declare dy = dy - 0.01;
> >      #declare posX = posX + 0.02;
> >      #declare posY = (posY + dy);
> >      #end
> >
> >
>
>
> #declare Rotation=0;
> #declare Rotation_angle=12;
>
> #while (Rotation < 360)
>      #declare posX = 0.02;
>      #declare posY = 0.82;
>      #declare dy = 0.055;
>      #while (posX < 0.3)
>          sphere {
>          <posX,posY,0>, 0.01
>          // material { agua }
>          rotate<0,Rotation,0>
>          }
>          #declare dy = dy - 0.01;
>          #declare posX = posX + 0.02;
>          #declare posY = (posY + dy);
>      #end
>      #declare Rotation = (Rotation + Rotation_angle);
> #end


Post a reply to this message

From: m@b
Subject: Re: Scene enquiry
Date: 21 Oct 2022 12:22:20
Message: <6352c73c@news.povray.org>
On 20/10/2022 10:57 AM, santividal wrote:
> Thank you so much m@b, that was exactly what I was looking for. What if I wanted
> to continue drawing my droplets in the lower level of the fountain? Where should
> I declare the distance from the Y axis so that the droplets appear as a
> continuation of the upper level?
> 
> Thank you in advance for any help

You could just add a second sphere and translate it before rotation:

#declare Rotation=0;
#declare Rotation_angle=12;


#while (Rotation < 360)
     #declare posX = 0.02;
     #declare posY = 0.82;
     #declare dy = 0.055;
     #while (posX < 0.3)
         sphere {<posX,posY,0>, 0.01 pigment{rgb<0,1,0>} 
       rotate<0,Rotation,0>}
         sphere {<posX,posY,0>, 0.01 pigment{rgb<0,0,1>} 
translate<0.2,-0.3,0> rotate<0,Rotation,0> }
         #declare dy = dy - 0.01;
         #declare posX = posX + 0.02;
         #declare posY = (posY + dy);
     #end
     #declare Rotation = (Rotation + Rotation_angle);
#end


Post a reply to this message

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