Basic Processing question for beginner (circular rays)

please format code with </> button * homework policy * asking questions

지금 이상태인데 저 선들이 한점에서 뻗어나가도록 모션을 넣고싶은데 어떻게 해야하나요?

그리고 모션이 끝난 다음에 이미지들을 넣고 그 위에 그림을 그릴 수 있도록 만들고싶은데 가능한가요?

at this moment on the screenshot i uploaded , I wanna make the lines go stretch out from the point at the middle. let me know how and after the motioning effect can i put some images on and draw on them? is it possible? please help me with that. thank u :~0

1 Like

The center is always
250,250

You can find out targetX, targetY:

targetX=cos(angle) * random(200,300) + 250;

targetY=sin(angle) * random(200,300) + 250;

angle running as float from 0 to TWO_PI

Or
Use same radius for both:

myR =random(200,300) ;

After that you can proceed and freely draw
images or whatever

2 Likes

Hello @ghostmane,

You can lerp over time from (250, 250) to (a, b) in your code in draw():

f = f+ 0.02; // 50 steps from 0 to 1

There is a lerp() function that you can use or you can do the math.

flowers.gif.mov

:)

1 Like