POV-Ray : Newsgroups : povray.newusers : Problem with 'object' errors? : Re: Problem with 'object' errors? Server Time
31 Jul 2024 06:23:54 EDT (-0400)
  Re: Problem with 'object' errors?  
From: Jessie K  Blair
Date: 16 Jun 2003 04:11:03
Message: <3eed7b97@news.povray.org>
Yes, I caught that problem as well.
Right now, my loop looks like this:

#while (CountR <= Row_Orbs)
   #declare CountN=0;
   #while (CountN <= Num_Orbs)
      object { Orbital translate <OrbitR*(Row_Orbs+CountR), CountR, 0>
rotate <0, CountN*OrbitR, 0> }
      #declare CountN = CountN+1;
   #end
   #declare CountR = CountR+1;
#end

I'm not very good with Mathematics and what I'm trying to do is create
something like this:

Take a sphere and then place many smaller spheres around it, each a constant
distance from the surface of the larger sphere.
Basically, a sphere within a sphere of spheres... if you can imagine that.

I do not understand how to plot points around a sphere at a constant
distance from the surface of the sphere.
I've been trying to take one band of the smaller spheres and rotate them
along the z-axis, which does what I want it to, but then I have the problem
of spheres overlapping at the poles.


"Warp" <war### [at] tagpovrayorg> wrote in message
news:3eed7237@news.povray.org...
> Jessie K. Blair <jbl### [at] earthlinknet> wrote:
> > object { OrbitalSphere (MajorRadius, MinorRadius, Diff_Radius,
SphereTex,
> > OrbitlTex) }
>
>   As people have already told you, that's your problem.
>   'object' can hold only one object, while OrbitalSphere() creates many.
>
> > #declare CountR=0;
> > #declare CountN=0;
>
> > #while (CountR <= Row_Orbs)
> >    #while (CountN <= Num_Orbs)
> >       object { Orbital translate <OrbitR, CountR, 0> rotate <0, CountN,
0> }
> >       #declare CountN = CountN+1;
> >    #end
> >    #declare CountR = CountR+1;
> > #end
>
>   By the way, is it intentional that you don't reset CountN at the
> beginning of the inner loop?
>   At the second loop of the outer loop, CountN will be equal to Num_Orbs
> and thus the inner loop is not executed at all. This makes the outer loop
> obsolete (because the inner loop is executed just once and that's it).
>
> --
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb
x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// -
Warp -


Post a reply to this message

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