That's not like what the Earth looks!

I fixed a minor bug in my perspective projection.
This commit is contained in:
Justin Kunimune 2019-01-14 17:49:10 -10:00
parent b2732d393a
commit 8d4acd1bde
3 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ public class Azimuthal {
public void setParameters(double... params) {
this.d = 1/(1 - 2*params[0]/100);
this.width = this.height = 2/Math.sqrt(d*d-1);
this.width = this.height = (Double.isFinite(d)) ? 2/Math.sqrt(d*d-1) : ORTHOGRAPHIC.getWidth();
}
public double[] project(double lat, double lon) {

View File

@ -336,7 +336,7 @@ public class Octohedral {
},
BAT_SHAPE(2*Math.sqrt(3), 0, 2, 0) { //Luca Concialdi's obscure "Bat" arrangement that I liked. I don't think it's the best map possible as Luca does, but I do think it's quite neat
BAT_SHAPE(2*Math.sqrt(3), 0, 2, 0) { //Luca Concialdi's obscure "Bat" arrangement that I liked. TODO: this doesn't quite match Concialdi's design
public double[] project(double lat, double lon) {
double centralMerid = Math.floor((lon+Math.PI/4)/(Math.PI/2))*Math.PI/2;

View File

@ -12,7 +12,7 @@ def plot_orthodrome(phi0, lam0, tht0):
for p in range(-90, 91):
points.append(obliquify(math.radians(p), tht0, phi0, lam0))
plot(points, close=False)
def generate_orthodromes():
"""generate an icosohedral orthodromic mesh, like the Brilliant logo (#notsponsored)"""