Group Abstract Group Abstract

Message Boards Message Boards

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

Create a list of circles with different radii

Posted 4 years ago

I want to create the following 3D plot which consists of theses lines:

Show[{
  ParametricPlot3D[
   {r Cos[t], r Sin[t], 0}, {t, 0, 2 \[Pi]}, {r, 0.9, 0.9 + 0.1}, 
   PlotStyle -> Lighter[Red, 1], Mesh -> None]
  ,
  ParametricPlot3D[
   {r Cos[t], r Sin[t], 0}, {t, 0, 2 \[Pi]}, {r, 0.8, 0.8 + 0.1}, 
   PlotStyle -> Lighter[Red, 0.8], Mesh -> None]
  ,
  ParametricPlot3D[
   {r Cos[t], r Sin[t], 0}, {t, 0, 2 \[Pi]}, {r, 0.7, 0.7 + 0.1}, 
   PlotStyle -> Lighter[Red, 0.6], Mesh -> None]
  ,
  ParametricPlot3D[
   {r Cos[t], r Sin[t], 0}, {t, 0, 2 \[Pi]}, {r, 0.6, 0.6 + 0.1}, 
   PlotStyle -> Lighter[Red, 0.4], Mesh -> None]
  }]

Output:

circles in red

That is - a collection of annulus with radii i to i+0.1, with a color gradient toward the center.

I want to have control over the i's, the 0.1 incerment, and the Lighter[Red, ___] filling.

I was thinking about something like the following:

Show[Table[
ParametricPlot3D[{r Cos[t], r Sin[t], 0}, {t, 0, 2 \[Pi]}, {r, i, i + 0.1}, 
 PlotStyle -> Lighter[Red, j], Mesh -> None],
{i,0,1,0.1},{j,1,0,-0.1}]]

Which means a table of annulus with radius (0 to 0.1), (0.1 to 0.2), (0.2 to 0.3) and so on until (0.9 to 1),

filled in colors Lighter[Red,1], Lighter[Red,0.9], Lighter[Red,8]and so on until Lighter[Red,0] (fully red).

But this rather gives a nested list. I want to list to be as it is in the minimal working example.

I hope I am clear..

Thanks a lot!

POSTED BY: Ehud Behar
3 Replies
Posted 4 years ago

You can also use Annulus e.g.

Table[{Lighter[Red, 1 - i], Annulus[{0, 0}, {i, i + 0.1}]}, {i, 0.1, 0.9, 0.1}] // Graphics

enter image description here

POSTED BY: Rohit Namjoshi
Posted 4 years ago

Thanks a lot.

I want to later transplant these circles in another Graphics3D, so Annulus is not good for my case.

POSTED BY: Ehud Behar
Posted 4 years ago

Hi Ehud,

Something like this?

Table[
  ParametricPlot3D[{r Cos[t], r Sin[t], 0}, {t, 0, 2 \[Pi]}, {r, i, i + 0.1}, 
    PlotStyle -> Lighter[Red, i], 
    Mesh -> None, 
    PlotPoints -> 40], {i, 0, 1, 0.1}] // 
Show[#, PlotRange -> All, ViewPoint -> Above] &

enter image description here

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