forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Graphing Calculator

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
dblock110



Joined: 16 Jan 2006
Posts: 3

PostPosted: Mon Jan 16, 2006 3:09 pm    Post subject: Graphing Calculator Reply with quote

Hello everyone...as my first Lua project...i wanted to make a graphing calculator for Lua for my PSP so i can use this in school...is this is a hard project? i have read the tut's but i dont know where to start...has this already been tried/made..? thanks in advance...
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Mon Jan 16, 2006 9:17 pm    Post subject: Reply with quote

ok. there is a calculator project inside the luaplayer package.
i'd start by modifying/adding things to that one.

Then you learn easily how to
- read virtual buttons
- evaluate calculations
- print results
- use colors
- make plottings
- update the screen
- exit the app

For available math. operations like
- math.sin
- math.log
- math.floor, etc.
see lua manual from the web.

If you need a qwerty keyboard for your calculator (to have a Sharp or TI-like machine) just use the plotFosk and readFosk routines from F.o.s.k.

that's it.
Back to top
View user's profile Send private message
dblock110



Joined: 16 Jan 2006
Posts: 3

PostPosted: Tue Jan 17, 2006 1:11 am    Post subject: Reply with quote

can you point me to other tutorials for programming..also..is there a list of commands somewhere to show wat they do and how to do it...i cant even get the drawLine to work...? thanks for reply....

drawLine(a,b,c,d)

wat should a b c d do? i thought it would be x1,y1,x2,y2, then it draw a line from point 1 to point 2 but that doesnt seem to be it...thank you
Back to top
View user's profile Send private message
youresam



Joined: 06 Nov 2005
Posts: 87

PostPosted: Tue Jan 17, 2006 1:39 am    Post subject: Reply with quote

screen:drawLine(x1,y1,x2,y2,color)
x1 and y1 is the begining coordinate, x2 and y2 are the end coordinate

Oh, and I sorta made something like what you want. Its a grapher, but you need to edit the code to change what it graphs.

http://forums.qj.net/showthread.php?p=237717
Back to top
View user's profile Send private message AIM Address
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Tue Jan 17, 2006 1:51 am    Post subject: Reply with quote

Sam, your links on that forum
Quote:
Download here
EDIT: link fixed
Website: http://rscx.com/dev/

do not work.

dblock, just open tat calculator thing, try to
copy it piece-by-piece to a new project and you'll see
whic part is for what.
but do not forget to preserve the "while loop " as a whole..
Back to top
View user's profile Send private message
dblock110



Joined: 16 Jan 2006
Posts: 3

PostPosted: Tue Jan 17, 2006 12:59 pm    Post subject: Reply with quote

can sum1 re up that grapher...
Back to top
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Tue Jan 17, 2006 1:32 pm    Post subject: Reply with quote

Start here

print("Result = ".. 1+1)
Back to top
View user's profile Send private message
youresam



Joined: 06 Nov 2005
Posts: 87

PostPosted: Wed Jan 18, 2006 8:19 am    Post subject: Reply with quote

WHOOPS! Sorry!
rscx.com/pspe
Back to top
View user's profile Send private message AIM Address
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Fri Jan 20, 2006 9:57 pm    Post subject: Reply with quote

have you made any progress, dblock? m.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group