/    Sign up×
Community /Pin to ProfileBookmark

circles strange

Setup—————-
Ok, my question is more of a general programming one but I’m doing it in javascript anyway (in max/msp so coreJS only but no matter…)

I have 3 variables:

[CODE]var angle a;// (0-360)
var angle b;//(0-360)
var angleinout; //(0/1)[/CODE]

these are meant to scribe any arc on a unit circle between two points. If the angle inout ==0 the arc goes CCwise from angleb and Cwise from angleA if its one, its the reverse.

Question———–
how do I test if the arc passes through a point? easy you say?? what happens if the arc passes 0 degrees??? I’ve tried for a day, I can’t get it.

Background— (I’m trying to draw a rectangle around the arc) In the end I’m trying to find the arcs minx,maxx,miny,and maxy values. so first I have to test to see if it hits the angles 0,90,180,270 then do some fancy minmax work. after that I’m drawing really cool curved slider which goes from any angle to any angle.

you guys rock
-matt

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@puuukeeyauthorSep 25.2005 — its a unit circle, the center is 0,0, the radius is 1. but I think I understand what yer sayin and I thank you for your help.
×

Success!

Help @puuukeey spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...