Comments (2)
Hey,
I am not a mathematician, and it's been a few years since I've worked with the underlying mathematics of this library, so the best I can do is answer your questions with code.
I recommend that you reverse engineer the examples below if you want to derive a formula, or ask a question on Mathematics Stack Exchange if you need a more detailed answer.
Answer 1
You can generate a Point
object using hyperbolic polar coordinates, then use the instance functions to derive euclidean properties:
// define using hyperbolic polar coordinates
let point = Point.givenHyperbolicPolarCoordinates(r, φ);
// convert to euclidean coordinates using instance methods
let x = point.getX();
let y = point.getY();
Answer 2
let angle = P1.hyperbolicAngleTo(P2);
let distance = P1.hyperbolicDistanceTo(P2);
let P3 = P1.hyperbolicDistantPoint(k * distance, angle);
Answer 3
To get the points P(k)
along L2
:
let Pk = Q.hyperbolicDistantPoint(k, 0);
It looks like I need to add a function to conveniently generate L2
, but for now you can do this:
// k is any nonzero real number (though should be "small" to comply with javascript limitations; ex: k = 1)
let L2 = Line,givenTwoPoints(Q, Q.hyperbolicDistantPoint(k, 0));
from hyperbolic-canvas.
Nice, thank you. I'll give it a try.
from hyperbolic-canvas.
Related Issues (12)
- Polygons not rendering correctly HOT 2
- how would I divide a polygon to triangles? HOT 4
- are hexagon tessellations possible in hyperbolic geometry? HOT 11
- Range Error: Maximum Call Stack Size Exceeded in Point.js [not a bug] HOT 15
- Are the units off? HOT 10
- rendering bug when I add fancy graphics HOT 33
- bug: polygons can't have a vertex of (0,0) HOT 1
- math problem with wrap around HOT 3
- Line object is too vague HOT 1
- distantPoint problem HOT 15
- how would I check if hyperbolic 2 lines intersect? HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperbolic-canvas.