Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Graphing calculator (https://forums.graalonline.com/forums/showthread.php?t=46422)

TribulationStaff 07-23-2003 08:40 PM

Graphing calculator
 
1 Attachment(s)
I realized I could do this, and I thought it would be rather neat to have one, so I wouldn't have to dig out my ti-89 every time I wanted to see a graph.

It is nothing spectacular, but let me save you all the trouble :)

I commented fairly well. If you understand parametric equations you will have no problem understanding this.

Edit: This is version 2 of the NPC. It can now handle x!=t, as well as adding a few new easy things to manipulate.

TribulationStaff 07-23-2003 08:42 PM

1 Attachment(s)
Here is the graph precoded into it. y=sin(t),x=t

TribulationStaff 07-23-2003 08:49 PM

1 Attachment(s)
Here is another one

x=t
y=t^2

I will finagle with it and put up one in which x!=t later.

TribulationStaff 07-24-2003 02:14 AM

1 Attachment(s)
Parametric equations with x!=t now work.

x=5*cos t
y=5*sin t

TribulationStaff 07-24-2003 02:23 AM

1 Attachment(s)
As do piecewise functions, to an extent.

x=t
y=(int(this.t/2)==this.t/2?3:0)

W4nk5t4 07-24-2003 02:23 AM

Pretty neat.

protagonist 07-24-2003 04:04 AM

Thanks, now I can use graal for school work.

Falados 07-24-2003 05:16 AM

Quote:

Originally posted by TribulationStaff
As do piecewise functions, to an extent.

x=t
y=(int(this.t/2)==this.t/2?3:0)

It'd work if you didnt connect the dots

TribulationStaff 07-24-2003 05:29 AM

Yeah I know, but I didn't feel like going through the trouble of finding all the discontinuities.

TribulationStaff 07-24-2003 08:45 AM

At Kai's suggestion, I would like to let you know that if you are interested, you can throw a sleep .05 (Shh! Kai, that was a preemptive Shh!) at the end of the for loop and the graphs will animate.

Kaimetsu 07-24-2003 09:48 AM

>:|

Dach 07-24-2003 08:28 PM

*falls asleep in .05 increments 200 times*

TribulationStaff 07-24-2003 10:05 PM

Thats only ten seconds dude.

adam 07-25-2003 12:32 AM

Creative ;)


All times are GMT +2. The time now is 01:12 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.