To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 1401
1400  |  1402
Subject: 
RE: A Sphere
Newsgroups: 
lugnet.cad
Date: 
Tue, 23 Mar 1999 17:02:17 GMT
Viewed: 
828 times
  
I have definitely been looking for a Lego sphere in the 16-20 stud range...I
should be more clear I guess. Thanks for the real sphere program though and
the compiler.

I have tried several configurations of Lego spheres in the 16-20 stud wide
range and all still feel too "blocky" (imagine that?)...

Rich
http://rich.cmcsmart.com


-----Original Message-----
From: news-gateway@lugnet.com [mailto:news-gateway@lugnet.com]On Behalf
Of Jacob Sparre Andersen
Sent: Tuesday, March 23, 1999 10:31 AM
To: lugnet.cad@lugnet.com
Subject: Re: A Sphere


Rich Thompson (richone@midsouth.rr.com) wrote:
Has anyone modeled a sphere in Ldraw? I am having trouble getting an
interesting sphere effect in a tight (16-20 stud) space and could use some
ideas...

A "real" sphere or a LEGO "sphere"?

I have been thinking of building some LEGO "spheres" in
various sizes, but here's a sketch for a program that writes
a "real" sphere for LDraw:

   -----------------------------------------------------------------

   procedure Put_Point (Latitude, Longitude : in Integer) is

      use Ada.Float_Text_IO;
      use Ada.Text_IO;

      Lat : Float := Float (Latitude);
      Lon : Float := Float (Longitude);

      X : Float := Cos (Latitude, 360.0) * Cos (Longitude, 360.0);
      Y : Float := Cos (Latitude, 360.0) * Sin (Longitude, 360.0);
      Z : Float := Sin (Latitude, 360.0);

   begin
      Put (Item => X,
           Fore => 3,
           Aft  => 6,
           Exp  => 0);
      Put (Item => Y,
           Fore => 3,
           Aft  => 6,
           Exp  => 0);
      Put (Item => Z,
           Fore => 3,
           Aft  => 6,
           Exp  => 0);
   end Put_Point;

   -----------------------------------------------------------------

   for Latitude in -90 .. 98 loop
      for Longitude in -180 .. 179 loop
         Put (" 4 16");
         Put_Point (Latitude,     Longitude);
         Put_Point (Latitude,     Longitude + 1);
         Put_Point (Latitude + 1, Longitude + 1);
         Put_Point (Latitude + 1, Longitude);
      end loop;
   end loop;

   -----------------------------------------------------------------

Play well,

Jacob

PS: You can find a free compiler for the code above at
    <URL:http://www.gnat.com/mirrors.html>.

        --------------------------------------------
        --  E-mail:         sparre@nbi.dk         --
        --  Web...: <URL:http://hugin.risoe.dk/>  --
        --------------------------------------------

LDraw FAQ:      <URL:http://hugin.risoe.dk/JJ_Memorial/FAQ/>



Message is in Reply To:
  Re: A Sphere
 
(...) A "real" sphere or a LEGO "sphere"? I have been thinking of building some LEGO "spheres" in various sizes, but here's a sketch for a program that writes a "real" sphere for LDraw: ---...--- procedure Put_Point (Latitude, Longitude : in (...) (26 years ago, 23-Mar-99, to lugnet.cad)

6 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR