mattrdowney / planetaria

A Unity framework for Euclidean 2-sphere games (e.g. 2D virtual reality games) [quasi-MIT license]
Other
10 stars 2 forks source link

Arc integration #116

Open mattrdowney opened 6 years ago

mattrdowney commented 6 years ago

Currently, integrated Arcs take the center of the arc and weigh it by it's arc length. This is incorrect.

The new integrations will be for disk and arc.

Arc integration will be approximately arc.position(-angle/4) + arc.position(+angle/4) [or the quarter positions to the left and right, where the horizontal components will cancel] and then multiply by arc length (weight). A more exact formula may exist, e.g. sine and cosine have straightforward derivatives.

Disk integration is more complicated, definition-dependent, and of questionable utility.

mattrdowney commented 5 years ago

This is similar to #130