spawn sprites in spiral pattern

Get help using Construct 2

Post » Fri Jul 21, 2017 8:19 pm

Hey all,

I was tinkering around and thought it'd be fun to generate sprites in a spiral pattern. I feel like I'm close but I'm just creating a shape akin to an upside/flipped down 'J'. If someone could look at my math (math is not my strong suit) /logic and help me see how to properly implement this it'd be appreciated!

https://www.dropbox.com/s/096v8punqh3tk ... .capx?dl=0
B
65
S
39
G
24
Posts: 352
Reputation: 18,106

Post » Fri Jul 21, 2017 9:06 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Jul 22, 2017 7:08 am

99Instances2Go wrote:https://www.dropbox.com/s/sn2ua06x7265fay/spiralArch.capx?dl=0


Oh wow, this is great, thank you @99instances2go ! This is super helpful :). I really appreciate you labeling the global variables so that I can understand what's actually going on. That's really thoughtful, thanks! I'm also wondering, would it be much trouble to ask how to get the spiral to start outside and move inwards, as opposed to moving outwards from a point? (Also, is there a web page where this kind of material is available for referencing?)
B
65
S
39
G
24
Posts: 352
Reputation: 18,106

Post » Sat Jul 22, 2017 11:30 am

Take any random point in the plane with a spiral drawn on.

Image

It is obvious that the chances that this point is part of the spiral (the solution) is very very small.

Imagine an empty plane, with a centre point. Now pick a random point on that plane.
The amount of spirals starting in that centre and and go trough that random point is like endless.

At the same time, if the spiral has to be eye appealing and constructible with a limited amount of objects, then the solution will mostly be 1 rotated or scaled spiral. The demand of an eye appealing spiral constrains the problem to the very first question, which i started this text with.

So, lets be lazy, to start with.
In stead of searching for a missing spiral, lets draw that special spiral that we like and love. And build it from out to inside.

https://www.dropbox.com/s/7cly93r7zl3b8 ... .capx?dl=0

Set the placeholders invisible in the end product.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Jul 22, 2017 12:05 pm

Lets scale the 'choosen spiral' so the last object is on a given radius from the centre.
https://www.dropbox.com/s/2kd1fz3s7ypvx ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Jul 22, 2017 4:17 pm

@99Instances2Go

This has been so incredibly helpful. Thank you so much for taking the time to put these together and make them easy to understand! I know they must have taken quite some time to make. I sincerely appreciate your help!
B
65
S
39
G
24
Posts: 352
Reputation: 18,106


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, valefor and 7 guests