Implicit surface operator should be centered in 0.

This commit is contained in:
Rémi Oudin 2018-02-12 18:36:59 +01:00
parent 9c37ead65d
commit 2861734258

View file

@ -68,7 +68,7 @@ void Spheroid::check_perlin_collision(PerlinNoise perlin) {
double Spheroid::operator() (double _x, double _y, double _z) const { double Spheroid::operator() (double _x, double _y, double _z) const {
return (pow(_x - center.x, 2) / pow(q, 2) return (pow(_x, 2) / pow(q, 2)
+ pow(_y - center.y, 2) / pow(q, 2) + pow(_y, 2) / pow(q, 2)
+ pow(_z - center.z, 2) / pow(p, 2) -1); + pow(_z, 2) / pow(p, 2) -1);
} }