| Author |
Comment/Response |
Michael
|
11/17/12 9:08pm
In Response To 'Re: Re: Re: Defining a different color for each...' --------- Building on Bill Simpson's example, if you have a lot of points (like a thousand), then using the VertexColors option of Point will have quite a bit faster rendering time:
polarData =
Table[{j, j, j Cos[j] Sin[j]/(50 \[Pi])}, {j, 0, 100 Pi, 1/10}];
polarPoint[{radius_, angle_, z_}] := {radius*Cos[angle],
radius*Sin[angle]};
myColorFn[{radius_, angle_, z_}] := Hue[z];
Graphics[{PointSize[.05],
Point[polarPoint /@ polarData,
VertexColors -> (myColorFn /@ polarData)]},
Axes -> True]
For a different sort of visualization, you can also use
ListContourPlot[polarToRectangular /@ polarData]
where polarToRectangular is Bill Simpson's
polarToRectangular[{radius_, angle_, color_}] := {radius*Cos[angle],
radius*Sin[angle], color};
URL: , |
|