0

I am trying to plot a double cone that has a specific aperture/apex angle (say theta) in MATLAB like the sketch below:

Double-Cone

My attempt: A cone is described parametrically as:

F(s,t,u) = (u tan(s) cos(t),u tan(s) sin(t),u)

where s runs from 0 to theta (aperture 2*theta), t runs from 0 to 2*pi and u from 0 to h (height).

s = linspace(0,theta);
t = linspace(0,2*pi);
[S,T] = meshgrid(s,t);
X = tan(S).*cos(T);
Y = tan(S).*sin(T);
Z = tan(S);
surf(X,Y,Z)

I wasn't sure how to add u to all this, so I simply did Z = tan(S). This does plot me a cone, but I'm not that sure on what I did here...

Help would be much appreciated.

3
  • what have you tried where is some code, equation or at least sketch? What is the real problem preventing you from success? Commented Jul 3, 2018 at 7:33
  • Updated. Thanks for the remark. Commented Jul 4, 2018 at 14:32
  • I would use for a=<0,2*Pi>, h=<-H,+H> something like: z=h; r=abs(h)*tan(aperture_half_angle); x=r*cos(a); y=r*sin(a); ... not a Matlab coder so there might be deviations like angle units ... Commented Jul 4, 2018 at 14:53

1 Answer 1

0

I think it is more easier if you use the implicit form of the cone.

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.