Message Boards Message Boards

0
|
5120 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Export a 3D Spline?

Posted 7 years ago

Take the following plot:

ParametricPlot3D[{{t*Sin[2*t], t*Cos[2*t], t}}, {t, -2*Pi, 2*Pi}, 
 AxesLabel -> {x, y, z}, PlotRange -> {All}, 
 PlotStyle -> Directive[RGBColor[0, 0, 0], Thickness[.01]], 
 PlotPoints -> 1000, MaxRecursion -> 15]

http://prntscr.com/eaedza

What is the most effective way to export this parametric plot as a continuous, 3D spline for use in other 3D applications such as Cinema4D? Is it possible to export it so that it's continuous, or can it only be exported as a set of discrete points in 3D space?

POSTED BY: John Travolski

Your plot is made up internally by a sequence of points connected by straight-line segments, i.e., a Line. It is continuous by definition. You can use Interpolation to get a spline interpolation:

myPlot = ParametricPlot3D[{{t*Sin[2*t], t*Cos[2*t], t}}, {t, -2*Pi, 
   2*Pi}]
myLine = Cases[myPlot, _Line, {1, Infinity}]
Interpolation[Transpose[{myLine[[1, 1, All, -1]], myLine[[1, 1]]}], 
 Method -> "Spline"]

As for exporting to 3D applications, have you tried the dxf file format?

Export[NotebookDirectory[] <> "file.dxf", myPlot]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract