To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.build.sculptureOpen lugnet.build.sculpture in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Building / Sculpture / 970
969  |  971
Subject: 
Re: The World according to Harshbarger, Lambrecht, and Lowell
Newsgroups: 
lugnet.build.sculpture
Date: 
Tue, 22 Nov 2005 08:07:15 GMT
Viewed: 
5034 times
  
In lugnet.build.sculpture, Bram Lambrecht wrote:
   In lugnet.build.sculpture, David Winkler wrote:
   I saw this and thought it was the greatest thing ever. I did my own virtual version with instructions.

Plate Lowell Globe

I followed Mr. Harshbarger’s lead and based it on a 48 stud diameter Lowell Sphere. The land masses come from the Etopo5 database provided by the NOAA.

Would you mind sharing what software or code you used to map the image to the sphere? I’m wondering how the globe would look with one of these images mapped to the Lego palette.
--Bram

The mapping from these images to a sphere is a conversion to Ldraw coordinates, then a rotation based on which panel we are rendering, then a conversion from these to polar coordinates, then interpreting phi to be latitude, and theta to be longitude. (Or vice versa, I always get them confused.) The polar coordinate equations are in most calculus books.

My mapping is hand rolled code, generally as follows:

foreach iX, iY, iZ
                           int iDiameter = 20 * 48;
                           double drx, dry, drz;
                           {
                               double fx, fy, fz;
                               fx = 20 * (iX - 0.5 * (iMaxX - iMinX)); fy = 20                                * (iY - 0.5 * (iMaxY - iMinY)); fz = (iDiameter                                / 2) + 8 * (iZ - iMaxZ);
                               switch (byteOnPanel)
                               {
                                   default:
                                   case 0:
                                       drx = -fx;
                                       dry = fy;
                                       drz = -fz;
                                       break;
                                   case 1:
                                       drx = fx;
                                       dry = fy;
                                       drz = fz;
                                       break;
                                   case 2:
                                       drx = -fz;
                                       dry = fx;
                                       drz = -fy;
                                       break;
                                   case 3:
                                       drx = fz;
                                       dry = -fx;
                                       drz = -fy;
                                       break;
                                   case 4:
                                       drx = -fy;
                                       dry = -fz;
                                       drz = fx;
                                       break;
                                   case 5:
                                       drx = fy;
                                       dry = fz;
                                       drz = fx;
                                       break;
                               }
                           }

                           double fr = Math.Sqrt(sqr(drx) + sqr(dry) +                            sqr(drz));
                           double fp = Math.Atan2(drz, Math.Sqrt(sqr(drx) +                            sqr(dry)));
                           double ft = Math.Atan2(dry, drx);
                           double px = (ft + Math.PI) / (2 * Math.PI);
                           double py = (fp + 0.5 * Math.PI) / Math.PI;
                           System.Diagnostics.Debug.Assert((px >= 0) && (px <=                            1));
                           System.Diagnostics.Debug.Assert((py >= 0) && (py <=                            1));
                           int iEtopoX = (int)(imageWidth* px);
                           int iEtopoY = (int)(imageHeight* py);
                           int iE = aiElevationData[(iEtopoY * imageWidth) +                            iEtopoX];
Then place a blue plate if iE is less than 0 (below sea level) and a green plate if iE is greater than or equal to 0 (at or above sea level).

The results of this are then fed into the filling software (described in the bunny document).



Message has 1 Reply:
  Re: The World according to Harshbarger, Lambrecht, and Lowell
 
I'm impressed with the calculations you did there. Maybe someone will build physical model based on these instructions and then one day we can get my globe together with that one and see how close I was to reality [grin]. eric (...) ... (...) (19 years ago, 22-Nov-05, to lugnet.build.sculpture)

Message is in Reply To:
  Re: The World according to Harshbarger, Lambrecht, and Lowell
 
(...) Would you mind sharing what software or code you used to map the image to the sphere? I'm wondering how the globe would look with (URL) one of these images> mapped to the Lego palette. --Bram (19 years ago, 22-Nov-05, to lugnet.build.sculpture, FTX)

14 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
    

Custom Search

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