next up previous contents
Next: Double sphere demonstration Up: Main menu in Objective Previous: Simple replacement of Turbo   Contents

Single sphere demonstration

Figure: Objective C Panel in which the nuances of drawing one single sphere can be studied in greater detail.
\begin{figure}\begin{picture}(400,400)(60,0)
\epsffile{fig13.eps}\end{picture}\end{figure}

The availability of a larger surface in general, and of higher resolution in particular, allows a user to study the details of sphere drawing in much greater detail in the NeXT environment. Consequently, customized windows have been created to elaborate the fairly general menu contained in the TURBO C programs.

Topics which can be emphasized are, the variation of the sphere parameters such as center, radius and orientation of the surface, as well as such aspects of visual appearance as the choice of representation of the surface, the use of point or line elements, the superposition of an axis, and so on.

if (drawUnisphere) {

  [self readEulerAngles:self];
  spheu(mrot,a0);
  sphdc(a,mrot);
  [[angleParameters cellAt:0:0] setDoubleValue:a[0]]; 
  [[angleParameters cellAt:1:0] setDoubleValue:a[1]]; 
  [[angleParameters cellAt:2:0] setDoubleValue:a[2]]; 
  [[angleParameters cellAt:3:0] setDoubleValue:sphar(mrot)]; 
  spRadius=[radiusSlider doubleValue];
  if (strcmp([[primiMenu selectedCell] title],"points")==0) drawView=0;
  if (strcmp([[primiMenu selectedCell] title],"lines")==0) drawView=5;

  if (strcmp([[traceMenu selectedCell] title],"spiral")==0) {
     sslen=[[spiralData cellAt:1:0] intValue];
     sspch=[[spiralData cellAt:0:0] intValue];
     geomss(r0,spRadius,a0,sspch,sslen);
     }
  if (strcmp([[traceMenu selectedCell] title],"grid")==0) {
     nlat=[[gridData cellAt:0:0] intValue];
     nlong=[[gridData cellAt:1:0] intValue];
     geosg(r0,spRadius,a0,nlong,nlat);
     }
  if (strcmp([[traceMenu selectedCell] title],"Lissajous")==0) {
     sllen=[[spiralData cellAt:2:0] intValue];
     nlat=[[gridData cellAt:0:0] intValue];
     nlong=[[gridData cellAt:1:0] intValue];
     geosl(r0,spRadius,a0,nlong,nlat);
     }
  if (strcmp([[traceMenu selectedCell] title],"fractal")==0) {
     frdepth=[[frData selectedCell] title][0]-'0';
     geofs(r0,spRadius,a0,frdepth);
     }
  if ([rimButton state]) {PSmoveto(0.0,0.0);
      PSarc(0.0,0.0,50.0*spRadius,0.0,360.0);}
  if (drawView==5) PSstroke();
  }



Pedro Hernandez 2004-05-13