|
| 01 Nov 2014 02:10 AM |
How do I Make an Oval?
I can make an Oval made out points via Bricks but I don't know how to Give each each Brick their Angle And Their Length
Can anyone give me an example? A 10 radius 360 Oval with 20 parts (With parts connected to each other)
TIA |
|
|
| Report Abuse |
|
|
powertool
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 3771 |
|
|
| 01 Nov 2014 02:19 AM |
That would be a circle.
We can do simple math to figure out exactly how long each part will be.
First off, we multiply the radius by two.
10 * 2 >20
Now we multiply by pi.
20 * math.pi > ~62.83185
Now we divide by our part count.
62.83185 / 20 > ~3.14159
This gives us how long our parts will be.
Now to find the angle. Divide 360 by the amount of parts.
360 / 20 >18
You would use an angle of 18 degrees, and a part length of 3.142. No trig required. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2014 02:21 AM |
thx
but how about Oval?
if its 10 radius with 360 degrees But X is half of the other one?
wide=0.5 for x=-deg/2,deg/2,deg/parts do local xx=math.sin(math.rad(x))*radius*wide local zz=math.cos(math.rad(x))*radius |
|
|
| Report Abuse |
|
|
powertool
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 3771 |
|
|
| 01 Nov 2014 02:26 AM |
I'm tired right now, I have yet to plot a circle on a rectangular graph without falling back on i, and I can't be bothered to look up oval math right now.
Look it up yourself if you're not too tired. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2014 02:30 AM |
for x=-deg/2,deg/2,deg/parts do local xa=x-deg/parts/2 local xb=x+deg/parts/2 local xxa=math.sin(math.rad(xa))*radius*wide local zza=math.cos(math.rad(xa))*radius local xxb=math.sin(math.rad(xb))*radius*wide local zzb=math.cos(math.rad(xb))*radius local xx=math.sin(math.rad(x))*radius*wide local zz=math.cos(math.rad(x))*radius local cff=orig*CF(xx,0,zz)* CFrame.Angles(0,math.atan2(xx,zz),0) local kek=CF(orig*CF(xxa,0,zza).p,orig*CF(xxb,0,zzb).p)*CF(0,0,-(orig*CF(xxa,0,zzb).p-orig*CF(xx,0,zz).p).magnitude)
nevermind i got it |
|
|
| Report Abuse |
|
|