Program Summary
| Filename |
drawball.pl
|
| Author |
Marvin Simkin
|
| Program Created |
2003-03-26
|
| Last Updated |
Jan 4 16:24
|
| Purpose |
convert spherical draw files into cartesian geometry
|
| syntax |
drawball.pl < flatmap.draw > sphere.draw
|
| flatmap.draw |
drawing instructions with X and Y in degrees
|
| sphere.draw |
drawing instructions modified to output a sphere
|
Discussion
This is handy for turning flat maps into globes.
If you have a straight line on input it will still be straight on output.
This means you might want to break lines every 1-30 degrees using, for
example, drawchop.pl, before passing them into this program.
Input data format
"draw" files where X and Y are expressed in degrees
and Z is some distance ABOVE THE CENTER of a sphere.
Throughout most of holodraw I have tried to be "xyz agnostic", that is,
no special meanings are assigned to X vs. Y vs. Z, and therefore
anything you do in your X dimension you can also do in Y and Z.
However for spherical geometry this just isn't possible.
You have to pick two of the dimensions and designate them to be
degrees around the circle, while the remaining dimension has to be
distance from the center.
Since holodraw originated as a way to convert GMT drawings to 3D,
I have decided to adopt the GMT convention where X and Y are the
directions available on a flat map, and Z is depth or radius.
Unfortunately this is not consistent with other 3D coordinate systems
that assume Y is "up" and map coordinates occur in X and Z.
For example, the VRML 2 elevationGrid specifies elevations in Y.
Meanwhile, let's not forget that in space, there is no such thing as "up",
and, no one can hear you scream, but that's another subject...
I suppose drawball.pl could be modified someday to accept an argument
stating which dimension is radius, but for now I haven't found a great
need for that.
| Written by |
Marvin Simkin |
| Filename |
drawball.html |
| Last updated |
April 5, 2005 |
|
|
|