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: How do I draw a circle.

Previous Thread :: Next Thread 
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
14 Aug 2014 01:42 PM
Mathematically with dots.
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
14 Aug 2014 01:43 PM
centerpoint, rotate it, move it out by translating via cframe

either that or use of cos sin and tan
Report Abuse
nicemike40 is not online. nicemike40
Joined: 19 Dec 2008
Total Posts: 1814
14 Aug 2014 01:54 PM
If you pick a point on the unit circle (radius=1) and you have the angle it makes (0-360 degrees) with the positive X-axis, it's coordinates are
( cosine(theta), sine(theta) )

If the radius is bigger/smaller than one, just do

( cosine(theta) * radius, sine(theta) * radius )

i.e.

local RADIUS = 10
local CENTER = Vector2.new(150, 50)
for theta = 1, 360 do
local point = CENTER + Vector2.new( math.cos(theta)*RADIUS, math.sin(theta)*RADIUS )
end
Report Abuse
meguy1 is not online. meguy1
Joined: 23 Apr 2010
Total Posts: 46
14 Aug 2014 01:59 PM
X = 0
width = 6
count = 0
Accuracy = 0.1
while X < (2*math.pi) do
count = count + 0.1
pos = game.Workspace.myPart.Position
c = game.Workspace.myPart:Clone()
c.Parent = game.Workspace
newPos = Vector3.new(width*math.sin(X+(math.pi/2))+pos.x, pos.y,width*math.sin(X)+ pos.z)
c.CFrame = CFrame.new(newPos)
* CFrame.Angles(0, -X, 0)
wait()
X = X + Accuracy
end


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