Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-23-2003, 08:40 PM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Lightbulb Graphing calculator

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.
Attached Files
File Type: nw graph.nw (9.9 KB, 287 views)
__________________


Help me keep scripting

Last edited by TribulationStaff; 07-24-2003 at 03:12 AM..
Reply With Quote
  #2  
Old 07-23-2003, 08:42 PM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Here is the graph precoded into it. y=sin(t),x=t
Attached Thumbnails
Click image for larger version

Name:	graal.png
Views:	304
Size:	7.9 KB
ID:	24487  
Reply With Quote
  #3  
Old 07-23-2003, 08:49 PM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Here is another one

x=t
y=t^2

I will finagle with it and put up one in which x!=t later.
Attached Thumbnails
Click image for larger version

Name:	graal.png
Views:	290
Size:	8.0 KB
ID:	24488  
Reply With Quote
  #4  
Old 07-24-2003, 02:14 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Parametric equations with x!=t now work.

x=5*cos t
y=5*sin t
Attached Thumbnails
Click image for larger version

Name:	graal.png
Views:	274
Size:	11.6 KB
ID:	24502  
Reply With Quote
  #5  
Old 07-24-2003, 02:23 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
As do piecewise functions, to an extent.

x=t
y=(int(this.t/2)==this.t/2?3:0)
Attached Thumbnails
Click image for larger version

Name:	graal.png
Views:	285
Size:	11.2 KB
ID:	24503  
Reply With Quote
  #6  
Old 07-24-2003, 02:23 AM
W4nk5t4 W4nk5t4 is offline
Banned
Join Date: Jul 2003
Posts: 148
W4nk5t4 is on a distinguished road
Pretty neat.
Reply With Quote
  #7  
Old 07-24-2003, 04:04 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Thanks, now I can use graal for school work.
Reply With Quote
  #8  
Old 07-24-2003, 05:16 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
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
__________________

subliminal message: 1+1=3
Reply With Quote
  #9  
Old 07-24-2003, 05:29 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Yeah I know, but I didn't feel like going through the trouble of finding all the discontinuities.
__________________


Help me keep scripting
Reply With Quote
  #10  
Old 07-24-2003, 08:45 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
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.
__________________


Help me keep scripting
Reply With Quote
  #11  
Old 07-24-2003, 09:48 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
>:|
__________________
Reply With Quote
  #12  
Old 07-24-2003, 08:28 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
*falls asleep in .05 increments 200 times*
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #13  
Old 07-24-2003, 10:05 PM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Thats only ten seconds dude.
__________________


Help me keep scripting
Reply With Quote
  #14  
Old 07-25-2003, 12:32 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Creative
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:14 PM.


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