
-----------------------------------
Sean
Tue Apr 29, 2008 4:45 pm

Math Equation Fun
-----------------------------------
After seeing Mackie do something in class today, I had the idea of creating my own. 

This program is a basic program, one that uses many formulas such as: tan, cos, sin, and arctan.

However, if you try to use arcsin and arccos, you have a Quit #100 error. No idea what that is.


%Sean McGregor

View.Set ("nobuttonbar")

var c : int
for x : 0 .. maxx
    randint (c, 0, 255)
    Draw.FillOval (x, round (arctan (tan (x)) * 200) + maxy div 2, 2, 2, c)
end for


You can play around with the arctan and tan part, changing it to what ever. and the 200 part to whatever dimension you see fit.
Made this in 5 minutes, off of the idea of Mackie. 

Mackie, I'd like to see the archery project of mine that you are doing.  :wink: 

http://img166.imageshack.us/img166/2308/arctandr2.th.pnghttp://img176.imageshack.us/img176/2498/cosandsinsd4.th.pnghttp://img166.imageshack.us/img166/9026/sinandcosgs1.th.png

-----------------------------------
Nick
Tue Apr 29, 2008 4:58 pm

RE:Math Equation Fun
-----------------------------------
do you know what the arc does?

it makes it use the Quenent identity of the function which basacally means 1/sin or 1/cos or 1/tan

why this causes an error?

what's 1 divided by 0?

-----------------------------------
Sean
Tue Apr 29, 2008 5:00 pm

Re: RE:Math Equation Fun
-----------------------------------
do you know what the arc does?

it makes it use the Quenent identity of the function which basacally means 1/sin or 1/cos or 1/tan

why this causes an error?

what's 1 divided by 0?

What error are you speaking of? You mean of arccos and arcsin?

-----------------------------------
Nick
Tue Apr 29, 2008 5:01 pm

RE:Math Equation Fun
-----------------------------------
that I am

-----------------------------------
Sean
Tue Apr 29, 2008 5:03 pm

RE:Math Equation Fun
-----------------------------------
Arccos finds the arc cosine of a value and displays it in radiants. I don't believe I would be able to minipulate it into what I have done. 

However arctan is usable.

It's just something I quickly came up with. Not that serious of a project.

-----------------------------------
Nick
Tue Apr 29, 2008 5:08 pm

RE:Math Equation Fun
-----------------------------------
I'm saying that 1/0 is undoable and since arc creates a recipocal, there is division, so if your cos/sin/tan value results in a 0 you get an error

-----------------------------------
Saad
Tue Apr 29, 2008 5:10 pm

Re: Math Equation Fun
-----------------------------------

However, if you try to use arcsin and arccos, you have a Quit #100 error. No idea what that is.

arccos, and arcsin of x has the restrictions that -1 >= x = x 