3
$\begingroup$

This is a follow-up question to one of my previous questions. How can I restrict Arrow (coming from the center c) till the length of a on the ellipse in the x-direction?

a=12.4786; b=33.3395; c=21.0691; e1=Ellipsoid[{0,0,c},{a,b,c}]; c1=RegionCentroid[e1]; axes=Graphics3D[{Red,Arrow[Tube[{c1,a UnitVector[3,1]}]]}]; g3=SliceContourPlot3D[x^2/a^2+y^2/b^2+(z-c)^2/c^2,{x,y,z}\[Element]e1,ContourShading->{Opacity[0.4,White]}]; Show[g3,Graphics3D[{Opacity[0.2],e1}],axes,AxesLabel->{X,Y,Z}] 

Link to the previous question: How to draw axes inside an ellipsoid

$\endgroup$

2 Answers 2

6
$\begingroup$
Arrow[Tube[{c1, c1 + a UnitVector[3, 1]}]] 
$\endgroup$
1
  • 1
    $\begingroup$ Now I get it! Thanks a lot :) $\endgroup$ Commented Aug 16, 2023 at 19:14
6
$\begingroup$

For the complete axes

$Version (* "13.3.0 for Mac OS X ARM (64-bit) (June 3, 2023)" *) Clear["Global`*"] a = 12.4786; b = 33.3395; c = 21.0691; e1 = Ellipsoid[{0, 0, c}, {a, b, c}]; c1 = RegionCentroid[e1]; g3 = Show[ SliceContourPlot3D[ x^2/a^2 + y^2/b^2 + (z - c)^2/c^2, {x, y, z} \[Element] e1, ContourShading -> {Opacity[0.4, White]}], Graphics3D[{#[[1]], Arrow[Tube[{c1, c1 + #[[2]] UnitVector[3, #[[3]]]}]]} & /@ Transpose[{{Red, Blue, Green}, {a, b, c}, {1, 2, 3}}]], BoxRatios -> Automatic] 

enter image description here

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.