generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Sin and Cos Circle Oval

Previous Thread :: Next Thread 
RobroxMasterDX is not online. RobroxMasterDX
Joined: 06 May 2012
Total Posts: 171
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 is not online. 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
RobroxMasterDX is not online. RobroxMasterDX
Joined: 06 May 2012
Total Posts: 171
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 is not online. 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
RobroxMasterDX is not online. RobroxMasterDX
Joined: 06 May 2012
Total Posts: 171
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image