Little Accomplishments.
May. 15th, 2003 01:39 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
So, a few weeks ago I acquired a copy of Mathematica, and I've been taking the occasional free moment now and then to try and figure out if its as nifty as folks say. I'm beginning to think it is. Yesterday I managed to update the WorldPlot module with the necessary transformations to plot Eckert IV Equal Area maps. Its extra nifty when you realize the transformations are non-analytic. Anyway, I can now get an Eckert map of the world in about 9 seconds of compute.
The reason this is important to me is that I've drawn all my RPG world maps in Eckert format and had no idea how to transform them into a globe or some other view. Now I'm fairly confident that I can write something that does the reverse transforms (which thankfully ARE analytic) and then reproject my world in any desired map format. Oh, and I'm sure I can get that 8 second delay down below 1/4 second. After all there is NO evidence that the WorldPlot routines were written with speed in mind.
The reason this is important to me is that I've drawn all my RPG world maps in Eckert format and had no idea how to transform them into a globe or some other view. Now I'm fairly confident that I can write something that does the reverse transforms (which thankfully ARE analytic) and then reproject my world in any desired map format. Oh, and I'm sure I can get that 8 second delay down below 1/4 second. After all there is NO evidence that the WorldPlot routines were written with speed in mind.
no subject
Date: 2003-05-15 10:49 am (UTC)And why the hell aren't the Mathematica libraries written with speed in mind? I know Matlab is continually looking for ways to make theirs perform faster and would assume the same holds for Mathematica. Maybe you haven't found the best functions to call yet and are doing too much work?
ah ah ah ah
Date: 2003-05-15 12:43 pm (UTC)geeks indeed ! WIll never understand you , but i'll keep being curious.
I only pretense to geekdom was boggling SPS by naming my floppies with roman numerals.
And now I will go back to play with my new box of parchment and quills. They're pruuuuudddyyy !
Azrhey
which ones?
Date: 2003-05-15 02:50 pm (UTC)Oooooh, parchment! Quills!
Here's hoping you come back and see this thread. :)
Of course I comeback ! I'm at work !
Date: 2003-05-15 04:31 pm (UTC)Ohh, right ! Work.
It was 3 or 4 years ago before CDRs were common, SPS found my 12 floppies of fonts. I/XII II/XII III/XII and so on, not to be confused with my 12 floppies of icons 1/12, 2/12 , etc. I didn't name them jsut numbered them. Still don't understandwhat was so weird about it.
MatLab vs Mathematica in an Invariant Homolocage!
Date: 2003-05-16 02:07 am (UTC)As for the speed thing. The only package I am using directly is Miscellaneous`WorldPlot`, which I suspect was written more as a demonstration of cartography than an attempt to do much that is useful. Certainly for simple calculations like 999999! Mathematica takes only a minute or two, so its not necessarily a sluggard.
As for not having found the best functions, decide for yourself. This is the standard Mollweide Projection and its definition in Mathematica's WorldPlot is:
Mollweide =
Module[{th},
(N[{Sqrt[8]/Pi #2 Degree/60 Cos[th],
Sqrt[2] Sin[th]}/.FindRoot[2 th + Sin[2 th] ==
Pi Sin[#1/60 Degree],{th,0}]] )&];
And here is the definition of Eckert IV as well as the code I wrote for it:
EckertIV =
Module[{Theta}, (N[
{ (2/Sqrt[Pi (4+Pi)]) (Degree/60) #2 (1 + Cos[Theta]))
, 2 Sqrt[Pi/(4+Pi) Sin[Theta]
} /.
FindRoot[ Theta + Sin[Theta] Cos[Theta] + 2 Sin[Theta] == (2 +Pi/2) Sin[#1/60 Degree]
, {Theta, 0}
]]) &];
They're almost identical (although I had to clean mine up a bit, since I used greek symbols that didn't translate well into html). They DO do lots of redundant root finding though. A lookup table for Theta would greatly speed things up.