Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: program with cirlce locations
program with cirlce locations
May 28 2009, 5:49 pm
By: Chubacca  

May 28 2009, 5:49 pm Chubacca Post #1



my friend told me that there was a program that made locations in the shape of a circle. Of course i asked him for the link, but he said he forgot where he found it (Unlikely). so i went here, and i just want to confirm that theres no program that makes circle locations. Am I right?



None.

May 28 2009, 5:51 pm Kaias Post #2



Yes, you cannot make circular locations.



None.

May 28 2009, 5:53 pm Chubacca Post #3



ty u can close this now



None.

May 28 2009, 5:55 pm Falkoner Post #4



To further explain, locations are made of 4 numbers, a max X, a min X, a max Y, and a min Y, so a circular location is not possible.



None.

May 30 2009, 6:20 pm Chubacca Post #5



Quote from Falkoner
To further explain, locations are made of 4 numbers, a max X, a min X, a max Y, and a min Y, so a circular location is not possible.
that is what i told him, but then he gave me coordinates x+y or something along that line. and a radii(radius) as well.



None.

May 30 2009, 8:04 pm Pyro682 Post #6



Tbh, I think it's pretty impossible for it to exist, let alone work. I don't think SC would support a program like that. I'm not a programmer, but I'm pretty sure that you'd have to write a mod that would allow it. SC literally doesn't have the programming in writing for it, so he's bullshitting you.



None.

May 31 2009, 2:01 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

a digital circle is a series of rectangles. It all depends on how accurate you want the "circle" to be.

A circle's equation is x^2+y^2=r^2

Let's say you want a circle of diameter 9 squares. That means you'll want to solve the equation for x=[0,4]. Lucky for us, working with squares makes this simple. Only use integers to find the +/- y value for each.
x y
0 4.5
1 4.387482194
2 4.031128874
3 3.354101966
4 2.061552813

Now, you have some numbers. Double the y value.

x y
0 9
1 8.774964387
2 8.062257748
3 6.708203932
4 4.123105626

Now your rectangles are:
1x9, 9x1
3x9, 9x3
5x8, 8x5
7x7, 7x7
9x4, 4x9

Obviously, some of these cancel out, specifically the first two lines. That means with 5 locations centered on a unit, you have a "sort of" circle:
5x8
8x5
7x7
9x4
4x9
You can tweak it more if you would like.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 31 2009, 4:28 am Pyro682 Post #8



To get close to a a real "Circle" (Digital Circle), you'd need to have quite a few locations.

So, Basically, if C = (Pi)(D)
When C is Circumference and D = Diameter, then
You'd need 4C (C/.25), because each location has 4 corners.

So, If you had a Circle With a Diameter of 320 Pixels (About the length of 10 Terrain Tiles), you'd need 4C = (3.14159)(320)
Crunching these numbers makes it 4C = 1005.30965
Then, Divide by 4 (To isolate C, the variable)
This would give you 251.32741228 Locations needed, but you have a decimal.
Since you cannot have part of a location, you'd need to round up, making it 252 Locations for a Circle with 5 squares that is a circle precise down to the pixel.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:40 pm]
Ultraviolet -- :wob:
[2024-5-28. : 8:43 am]
TheHappy115 -- Yea, thats the issue. Thanks. It would also explain why my deleted map couldn't get updated. Updated version reduced collision on units (only thing added) since was dodging game (players collide with each other)
[2024-5-28. : 5:26 am]
Ultraviolet -- If so, I'd just focus on getting them on scmscx.com and then you can link to that in the showcase thread for your maps
[2024-5-28. : 5:25 am]
Ultraviolet -- I can't upload my EUD maps, I think the DLDB has some issue with handling them. Are you trying to upload EUD maps?
[2024-5-28. : 2:06 am]
TheHappy115 -- Its been awhile but ever since I requested one of the Maps I posted to be deleted since I couldn't delete it myself (or update it), I haven't been able to upload any more maps. Any reason for that?
[2024-5-26. : 7:14 pm]
Kyradax -- Hi
[2024-5-26. : 5:05 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-5-25. : 9:22 am]
Zycorax -- :wob:
[2024-5-23. : 3:50 pm]
Ultraviolet -- :wob:
[2024-5-23. : 6:26 am]
UndeadStar -- :wob:
Please log in to shout.


Members Online: Ultraviolet