Search found 6 matches

by Starnub
Sat Aug 07, 2021 12:36 am
Forum: Support and Development
Topic: Boolean function for intersection between circular segment and circle
Replies: 32
Views: 36837

Re: Boolean function for intersection between circular segment and circle

BrotSagtMist wrote: Sat Aug 07, 2021 12:32 am What end point? Lines are infinitive.
OH right I forgot about the distance check, this is great. Thank you very much!
by Starnub
Sat Aug 07, 2021 12:30 am
Forum: Support and Development
Topic: Boolean function for intersection between circular segment and circle
Replies: 32
Views: 36837

Re: Boolean function for intersection between circular segment and circle

Might be easier to see it as triangle instead. Given a point, a range and an angle you can calculate another point. With two points you can calculate the function of a line. Having two lines you need to resolve booth using your balls x position. In other words: if we resolve the lower line using th...
by Starnub
Fri Aug 06, 2021 11:55 pm
Forum: Support and Development
Topic: Boolean function for intersection between circular segment and circle
Replies: 32
Views: 36837

Re: Boolean function for intersection between circular segment and circle

pgimeno wrote: Fri Aug 06, 2021 10:29 pm Do they intersect if the sector is contained within the circle, or did you mean a circumference rather than a circle?
There wouldn't be a situation where the sector lies within the circle, here's an image of what I'm working with.

Image
by Starnub
Fri Aug 06, 2021 11:54 pm
Forum: Support and Development
Topic: Boolean function for intersection between circular segment and circle
Replies: 32
Views: 36837

Re: Boolean function for intersection between circular segment and circle

darkfrei wrote: Fri Aug 06, 2021 8:09 pm Can you draw the situation?
Why not just intersection of two circles?
Image

This is for a simple game I'm making, basically I need to figure out if the red circle lies within the circle sector here.
by Starnub
Fri Aug 06, 2021 1:58 pm
Forum: Support and Development
Topic: Boolean function for intersection between circular segment and circle
Replies: 32
Views: 36837

Boolean function for intersection between circular segment and circle

Hey guys, I've been trying to figure out how to find out if a segment and another circle intersect given the following: Circle X, Y Circle radius Sector X, Y Sector radius Sector angle 1 Sector angle 2 From a bit of Googling I found this but my stupid dumb brain can't figure out which language this ...
by Starnub
Thu Nov 07, 2019 6:28 am
Forum: Support and Development
Topic: Passing a 'self' function as a parameter
Replies: 4
Views: 5575

Passing a 'self' function as a parameter

I'm not really sure how to word this properly, but what I want to do is pass a function that requires the self argument to another outside function. Say I have a Button object: local button = {} button.__index = button function newButton(f) return setmetatable({function = f}, button) end function bu...