I am trying to find the coordinates of a specific point on an arc. I'm using getWidth & get Height to scale my Arc to different window/screen sizes.
This is my basic code for drawing an arc:
Code: Select all
function love.load()
width = love.graphics.getWidth( )
height = love.graphics.getHeight( )
love.window.setMode(width, height, {resizable=true, vsync=false, minwidth=400, minheight=300})
end
function love.draw( )
width = love.graphics.getWidth( )
height = love.graphics.getHeight( )
local x = 1
local y = 6
local radius = (y*.15)*(height/2)
local angle1 = x*(math.pi/-8)
local angle2 = math.pi
love.graphics.setLineWidth(2)
love.graphics.arc("line", width/2, height/2, radius, angle1, angle2)
end
Thanks in advance for any advice that comes.