Group Abstract Group Abstract

Message Boards Message Boards

1
|
5K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Command substitute of ListSurfaceOfRevolucion

Posted 10 years ago
POSTED BY: Luis Ledesma
3 Replies
Posted 10 years ago

Thank you very much for your help Sanders, that's exactly what I was looking for, I think this will be very helpful to several acquaintances, besides this as more people see it get better, but I sincerely not believe that there is much room for improvement. Thanks for your help, saludos amigo.

Luis Ledesma

POSTED BY: Luis Ledesma

Even better is redoing what they did:

ClearAll[ListRevolutionPlot3D]
ListRevolutionPlot3D[rzpts_List,\[Theta]n_Integer?Positive]:=Module[{\[Theta],pts,indices,dims},
    \[Theta]=CirclePoints[\[Theta]n];
    pts=Table[Append[rz[[1]] j,rz[[2]]],{rz,rzpts},{j,\[Theta]}];
    dims=Most[Dimensions[pts]];
    pts=Join@@pts;
    indices=ArrayReshape[Range[Times@@dims],dims];
    indices=Partition[indices,{2,2},{1,1},{1,1}];
    indices=Map[Flatten[#][[{1,2,4,3}]]&,indices,{2}];
    Graphics3D[GraphicsComplex[pts,Map[Polygon,indices,{2}]]]
]

pts={{0,0},{1,1},{2,1},{2,2},{0.5,2},{0,2.5}}
ListRevolutionPlot3D[pts,25]

enter image description here

POSTED BY: Sander Huisman

Perhaps a solution that works something like this:

pts = {{0, 0}, {1, 1}, {2, 1}, {2, 2}, {0.5, 2}, {0, 2.5}}
{f1, f2} = Interpolation[#, InterpolationOrder -> 1] & /@ Transpose[pts]
RevolutionPlot3D[{f1[t], f2[t]}, {t, 1, 6}, PlotPoints -> 80, MaxRecursion -> 0]

¡saludos! --SH

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard