# How to create a surface based on spherical triangle corner points

Axcel shared this question 1 year ago

Hi there,

Imagine I have a sphere in 3D mode and I defined three points on its surface (see file attached), how can I create a surface with these three points forming the corner points and thereby allowing me to color-in that spherical triangle on the sphere? I would love to have a tool that allows me to click the center point and the three corner points in order to create the surface but I don't know how to do it...

Thanks and kind regards

Axcel

2

Doesn't look to me an easy thing to achieve...

https://www.geogebra.org/m/ZaQWGcz5

1

```u = Vektor(M, A)
v = Vektor(M, B)
w = Vektor(M, C)
r = sqrt(Skalarprodukt(M-A, M-A))```
`Oberfläche(x((cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r ) + sin(k) w) / sqrt(Skalarprodukt(cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r) + sin(k) w, cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r ) + sin(k) w)) * r + M ), y((cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r ) + sin(k) w) / sqrt(Skalarprodukt(cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r) + sin(k) w, cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r) + sin(k) w)) * r + M ), z((cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r) + sin(k) w) / sqrt(Skalarprodukt(cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r) + sin(k) w, cos(k) ((cos(t) u + sin(t) v) / sqrt(Skalarprodukt(cos(t) u + sin(t) v, cos(t) u + sin(t) v)) * r ) + sin(k) w)) * r + M ), t, 0, pi/2, k, 0, pi/2)`

Das Werkzeug zu machen überlasse ich jemand anderen (und das Vereinfachen auch).

Falls das jemand schöner machen will. Es basiert alles auf der Kurvenfunktion

$K\left(\varphi\right) = \frac{\cos\left(\varphi\right) \vec{u} + \sin\left(\varphi\right) \vec{v}}{\left|\cos\left(\varphi\right) \vec{u} + \sin\left(\varphi\right) \vec{v}\right|}\left|\vec{u} \right| \quad \forall \; \varphi\in\left[0;\frac{\pi}{2}\right]$.
Wobei die Vektoren u und v beliebige Ursprungsvektoren sind (deshalb nach Anwendung u.U. verschieben).

1
1

I did not knew of those simplifications, thanks.

Now one additional command for 3-point-patches is:

`Oberfläche(((C - M) cos(l) + ((A - M) cos(k) + (B - M) sin(k)) / sqrt(((A - M) cos(k) + (B - M) sin(k)) ((A - M) cos(k) + (B - M) sin(k))) sin(l)) / sqrt(((C - M) cos(l) + ((A - M) cos(k) + (B - M) sin(k)) / sqrt(((A - M) cos(k) + (B - M) sin(k)) ((A - M) cos(k) + (B - M) sin(k))) sin(l)) ((C - M) cos(l) + ((A - M) cos(k) + (B - M) sin(k)) / sqrt(((A - M) cos(k) + (B - M) sin(k)) ((A - M) cos(k) + (B - M) sin(k))) sin(l))) Abstand(M, A) + M, k, 0, π / 2, l, 0, π / 2)`

1

It could be written much shorter if there was a possibility to use UnitVector( <Vector> ), points or vectors at all within Formulas or Surfaces. Then it could be written as:

`F(u, v, t) = UnitVector(cos(t) u + sin(t) v)`

`Surface(  F(A-M,F(B-M,C-A,k),l) * Distance(M, A) + M , k, 0, π / 2, l, 0, π / 2)`

But unfortunately it is not possible.

1

Thanks to all of you first of all! It is in fact much more "complicado" than I would have thought. I also hope that a future version of GeoGebra will provide easier means of achieving this, just as Loco has stated above.

In fact, the genius mathmagic helped me once on a different but similar matter. Attached please find the file from back then. I appreciate the fact that the surface has a slightly larger distance from the center point than the radius of the sphere so that there is a "clean display" of the surface. It's only that the file works with four points rather than three. How must the formula in the file be modified for three corner points?

1

That's impressive, mathmagic! (As usual, I'd say 😉)

1

@Axcel

just replace one of the corner points within that formula with the name of one of the other points (a.e. replace F with E within that formula) and simplify it (see the formula posted by mathmatic bellow).

And if you had reread those posts of him, he posted that formula that time: Spherical angles on the surface of a sphere

It is a quite easy technique similar to mine posted above. He builds a curve between two Points A and B with a simple linear combination A t + (1-t) B with t from 0 to 1 and combines this twice to get a point on an planar triangular surface between three or four points. And to get the curved triangle he divides the vector of the surface point by his the distance to the center point and multiplies it with an radius. Simple and robust.

2

or equivalently use

b = Surface(A + Distance(A, C) 1.01((1 - u) (1 - v) C + (1 - u) v D + u E - A) / sqrt(((1 - u) (1 - v) C + (1 - u) v D + u E - A)²), u, 0, 1, v, 0, 1)

1

Thank you guys very much for your help. And yes, matmagic gave me the answer earlier already but I was too blind to see it... Sorry for that.

@Loco: thanks for that brief explanation of what matmagic did with his formula. That was very helpful to get the idea behind his formula.

1

see the posts of my link, it is very easy