We are about to switch to a new forum software. Until then we have removed the registration on this forum.

- All Categories 25.7K
- Announcements & Guidelines 13
- Common Questions 30
- Using Processing 22.1K
- Programming Questions 12.2K
- Questions about Code 6.4K
- How To... 4.2K
- Hello Processing 72
- GLSL / Shaders 292
- Library Questions 4K
- Hardware, Integration & Other Languages 2.7K
- Kinect 668
- Arduino 1K
- Raspberry PI 188
- Questions about Modes 2K
- Android Mode 1.3K
- JavaScript Mode 413
- Python Mode 205
- Questions about Tools 100
- Espanol 5
- Developing Processing 548
- Create & Announce Libraries 211
- Create & Announce Modes 19
- Create & Announce Tools 29
- Summer of Code 2018 93
- Rails Girls Summer of Code 2017 3
- Summer of Code 2017 49
- Summer of Code 2016 4
- Summer of Code 2015 40
- Summer of Code 2014 22
- p5.js 1.6K
- p5.js Programming Questions 947
- p5.js Library Questions 315
- p5.js Development Questions 31
- General 1.4K
- Events & Opportunities 289
- General Discussion 365

Hi all,

I'm trying to get the following going. Perhaps someone could be of assistance.

I'd like to have the first Outer Circle rotate clockwise and disappear while the second outer circle appears then disappears rotating counter clockwise. All the while the inner circle fades from the outside in making it appear to grow and get smaller.

Any suggestions ? Below is my code

All I've seemed to manage is the rotation of the entire image which is not ideal :\ Many thanks

```
int i = 0;
float x;
float y;
float angle = 1000;
float r = 5000;
float diff = 5000;
void setup() {
size(600, 600);
smooth();
background(0);
}
void draw() {
/** Outer Circle*/
background(0);
translate(width/2, height/2);
for (int i= 0; i<150; i++) {
rotate(r);
rotate(TWO_PI/150);
ellipse(100, 100, 4, 4);
ellipse(103, 103, 4, 4);
ellipse(105, 105, 4, 4);
ellipse(107, 107, 4, 4);
ellipse(109, 109, 4, 4);
ellipse(111, 111, 4, 4);
ellipse(113, 113, 4, 4);
ellipse(115, 115, 4, 4);
ellipse(117, 117, 4, 4);
stroke(1);
strokeWeight(2);
/** Second Outer*/
rotate(TWO_PI/172);
ellipse(128, 128, 5, 5);
ellipse(131, 131, 5, 5);
ellipse(133, 133, 5, 5);
ellipse(135, 135, 5, 5);
ellipse(137, 137, 5, 5);
ellipse(139, 139, 5, 5);
ellipse(141, 141, 5, 5);
ellipse(143, 143, 5, 5);
ellipse(145, 145, 5, 5);
stroke(1);
strokeWeight(2);
/** Inner circle*/
rotate(TWO_PI/50);
ellipse(4, 4, 4, 4);
ellipse(6, 6, 4, 4);
ellipse(8, 8, 4, 4);
ellipse(10, 10, 4, 4);
ellipse(12, 12, 4, 4);
ellipse(14, 14, 4, 4);
ellipse(16, 16, 4, 4);
ellipse(18, 18, 4, 4);
ellipse(20, 20, 4, 4);
ellipse(22, 22, 4, 4);
ellipse(24, 24, 4, 4);
ellipse(26, 26, 4, 4);
ellipse(28, 28, 4, 4);
ellipse(30, 30, 4, 4);
ellipse(32, 32, 4, 4);
ellipse(34, 34, 4, 4);
ellipse(36, 36, 4, 4);
ellipse(38, 38, 4, 4);
ellipse(40, 40, 4, 4);
ellipse(42, 42, 4, 4);
ellipse(44, 44, 4, 4);
ellipse(46, 46, 4, 4);
ellipse(48, 48, 4, 4);
ellipse(50, 50, 4, 4);
ellipse(53, 53, 4, 4);
ellipse(56, 56, 4, 4);
ellipse(58, 58, 4, 4);
ellipse(60, 60, 4, 4);
ellipse(62, 62, 4, 4);
ellipse(64, 64, 4, 4);
ellipse(66, 66, 4, 4);
ellipse(68, 68, 4, 4);
ellipse(70, 70, 4, 4);
ellipse(72, 72, 4, 4);
ellipse(74, 74, 4, 4);
ellipse(76, 76, 4, 4);
ellipse(78, 78, 4, 4);
ellipse(80, 80, 4, 4);
ellipse(82, 82, 4, 4);
ellipse(84, 84, 4, 4);
stroke(1);
strokeWeight(2);
}
angle = angle =1000;
r = r - diff;
if ( r == 0 || r == 1000) {
diff = diff * 5;
}
}
```

Tagged:

This discussion has been closed.

## Answers

before copy and paste here, hit ctrl-t in processing IDE, it auto-formats your code (indents)

also for properly posting code here, pls read "To newcomers in this forum: read attentively these instructions"

despite saying 'Part 2' in the subject, this is a duplicate of this:

http://forum.processing.org/two/discussion/7893/fading-and-rotating-newbie-help

closing.