Subject:
|
Re: A Sphere
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Tue, 23 Mar 1999 16:30:30 GMT
|
Viewed:
|
1051 times
|
| |
| |
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 has 1 Reply: | | RE: A Sphere
|
| 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 (...) (26 years ago, 23-Mar-99, to lugnet.cad)
|
Message is in Reply To:
| | A Sphere
|
| 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... Rich (URL) (26 years ago, 20-Mar-99, to lugnet.cad)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|