Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Another math problem ..

Author
Message
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 6th Jun 2010 15:22
i have to draw an Arc of circumference .

I kinow :

x1,y1 - x2,y2 - xc.yc and the ray ...

but when drawing the Arc with dots,
i've needed the points are at a certain DISTANCE from each other

DISTANCE from dot to dot = Precision#

please write me a function .. (!)

Es. CircumferenceArc(x1#,y1#,x2#,y2#,xc#,yc#,Precision#)
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Jun 2010 22:35 Edited at: 6th Jun 2010 22:38
You won't get very far if you aren't prepared to experiment.

If you've already had a try at this then post your code and someone (maybe me) will try to help show you where you are going wrong. Not many people will write you a function you haven't even attempted for yourself first on these forums (as tempted as I am to find a solution to this one!)...

Sorry!

EDIT: Also, you aren't really posing a question for a workable solution as an arc defined in this way may not fit an even number of incriments into the arc if specified by 'distance apart'. A more practical way of showing the arc would be by a 'number of dots'. Maybe if we had a better explanation of what you need this for it might help a little better in finding a good solution for you

Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 6th Jun 2010 23:45
ok ..
my first problem is my english ....(!)
when I find someone who can translate well, i can explain better ..

I now try again : (google translate)

I have an arc of a circle passing for x1,y1-x2-y2
i know the ray (and start position of the ray xc,yc)
the arc should be composed of a "number of dot"
points must be distant from each of a value "Precision#"

Ps "number of dot" must be calculated by the function
Es. CircumferenceArc(x1#,y1#,x2#,y2#,xc#,yc#,Precision#)
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 6th Jun 2010 23:46
Ps "number of dot" AND POSITION FOR EVERY DOT must be calculated by the function
Es. CircumferenceArc(x1#,y1#,x2#,y2#,xc#,yc#,Precision#)
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2010 11:09 Edited at: 7th Jun 2010 11:10
Actually I think I understood your translation better, your English is more than adequate!

I'm still wondering if you have actually tried this yet?

Either way here is my understanding of what you want:


Is that right?

Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 7th Jun 2010 13:01
Yes !!!!!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2010 13:22
Rock and Roll... OK I'll take a look but it would be nice if you would at least try to solve this yourself too as you will learn much more in the process!

Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 7th Jun 2010 13:53
Ps my code is 9994 line ...

you can look on my site "www.visualjump3d.com"

Now i re_write all code ...
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2010 15:48
Looks like an interesting project! Here's one possible answer:


Hope it helps!

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Jun 2010 16:15
Here's another:

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2010 16:24
Yours is much neater GG and probably more stable (knowing the quality of your coding), the x2 and y2 of mine are only used for getting the angle too.

Lucky you @Guido Italy, getting two answers in one day! One from Green Gandalf too!!

Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 7th Jun 2010 16:33
Thank to All !!!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Jun 2010 16:59
Quote: "and probably more stable "


I wouldn't bet on it. I only spent a couple of minutes testing it.
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 7th Jun 2010 17:26
now I try to bring the code into my software.

after I tell you ....

Login to post a reply

Server time is: 2026-07-25 16:20:15
Your offset time is: 2026-07-25 16:20:15