Group Abstract Group Abstract

Message Boards Message Boards

1
|
11.1K Views
|
11 Replies
|
8 Total Likes
View groups...
Share
Share this post:

[?] Plot an Archimedean Spiral with equidistant points?

Posted 8 years ago

Hi

has somebody experience with the Archimedean Spiral? In general it is quite simple to create an Archimedean Spiral by e.g. a line function. I rather want to create a spiral with equidistant points. The amount of the "sampling" points should be adjustable. I saw some examples, but I could not follow it, for example:

Equation to place points equidistantly on an Archimedian Spiral using arc-length

I created following code so far:

a = 0.75;
K = 3;
L1 = 90; 
rp = 0.0; 

alpha = L1*Pi/180;

Sample = 80;   (* sampling per azimuth direction *)
M = 1;                  (* number of spirals *)

x1[t_, m_] := (rp*Cos[alpha]) + a*t*Cos[t + (m*2*Pi/M)];
y1[t_, m_] := (rp*Sin[alpha]) + a*t*Sin[t + (m*2*Pi/M)];

data1 = Table [{x1[t, m], y1[t, m]}, {t, 0, K*2 \[Pi], 
2 \[Pi]/Sample}, {m, 1, M}];

dataflat1 = Flatten[data1, 1];

Graphics[{Thick, Blue, PointSize[0.0075], Point[dataflat1]},  Axes -> True, AxesLabel -> {X, Y}]

enter image description here

POSTED BY: Nikki Peter
11 Replies
Posted 8 years ago
POSTED BY: Nikki Peter
POSTED BY: Michael Rogers
Posted 8 years ago
POSTED BY: Nikki Peter

This MeshFunctions specification is mentioned here (along with "CurveLength"):

http://community.wolfram.com/groups/-/m/t/29463

It would be nice to add this to the documentation.

POSTED BY: Szabolcs Horvát

No worries ))

POSTED BY: Vitaliy Kaurov
POSTED BY: Michael Rogers

There's the MeshFunction setting "ArcLength:

ParametricPlot[{x1[t, 0], y1[t, 0]}, {t, 0, K*2 \[Pi]}, 
 PlotStyle -> None, Mesh -> K*Sample - 2, 
 MeshFunctions -> {"ArcLength"}, MeshStyle -> Blue, 
 Epilog -> {Blue, Point[{x1[#, 0], y1[#, 0]} & /@ {0, K*2 Pi}]}]

Note that K is used internally by Mathematica for dummy variables. Setting it (or other single-letter variables) equal to a value is probably not a good idea. In general, I avoid starting names with capital letters, so that my functions and variables cannot conflict with the built-in functions and variables.

POSTED BY: Michael Rogers
POSTED BY: Vitaliy Kaurov

MeshFunctions->{"ArcLength"}

Vey nice! Is this documented?

POSTED BY: Szabolcs Horvát
POSTED BY: Vitaliy Kaurov

How about simply PolarPlot[t, {t, 0, 20 Pi}]? It uses adaptive sampling to give you a high quality output. Or are the specific sampling points important to you?

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