Group Abstract Group Abstract

Message Boards Message Boards

0
|
14.4K Views
|
8 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Star Shape cartesian equation

Posted 11 years ago

I need Cartesian equation of the following star shape. As i want to use its Cartesian equation for Plot3D.enter image description here

POSTED BY: Kashif Nazar
8 Replies
Posted 11 years ago

Please note when you post the same question simultaneously to multiple sites: Mathematica.Stackexchange

POSTED BY: Jim Baldwin
POSTED BY: Gianluca Gorni
Posted 11 years ago
POSTED BY: Erik Mahieu

Try with this syntax:

RegionFunction -> 
 Function[{x, y, z}, 
  1.2 + 0.4 Cos[4 ArcTan[x, y]] < Sqrt[x^2 + y^2] < 
    6 + 0.8 Cos[18 ArcTan[x, y]] && z <= 1]
POSTED BY: Gianluca Gorni
POSTED BY: Kashif Nazar

Have you tried giving the option

RegionFunction -> Function[{x, y, z}, z<=1]
POSTED BY: Gianluca Gorni

Helllo , I am really thankful to all members who responded my problem, and these suggestions really helped me and i have now the following 3D graph, I want to merge 3D graph in (figure1) below into unit circle ( as like in figure 2) but on plane i need the same curve as in the following first figure

Figure1 enter image description here
Figure2 enter image description here

POSTED BY: Kashif Nazar
Posted 11 years ago

And if you need a 3D shape you can proceed also as follows: Convert to cartesian using FromPolarCoordinates:

In[18]:= gear[\[Theta]_] := {1 + 
   1/8 Sin[18 (\[Theta] - \[Pi]/4)], \[Theta]}
FromPolarCoordinates[gear[\[Theta]]]
ParametricPlot[%, {\[Theta], 0, 2 \[Pi]}]

Out[19]= {Cos[\[Theta]] (1 + 1/8 Sin[18 (-(\[Pi]/4) + \[Theta])]), 
 Sin[\[Theta]] (1 + 1/8 Sin[18 (-(\[Pi]/4) + \[Theta])])}

parametric plot

Insert a 3rd dimension (eg in the y direction) and make a ParametricPlot3D:

In[30]:= Insert[FromPolarCoordinates[gear[\[Theta]]], y, 2]
ParametricPlot3D[%, {\[Theta], 0, 2 \[Pi]}, {y, 0, 1}, 
 PlotPoints -> 25, PlotTheme -> "Marketing",  
 PerformanceGoal -> "Quality"]

Out[30]= {Cos[\[Theta]] (1 + 1/8 Sin[18 (-(\[Pi]/4) + \[Theta])]), y, 
 Sin[\[Theta]] (1 + 1/8 Sin[18 (-(\[Pi]/4) + \[Theta])])}

parametric plot in 3D

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