Graphing Calculator

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
dblock110
Posts: 3
Joined: Mon Jan 16, 2006 3:07 pm

Graphing Calculator

Post by dblock110 »

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...
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

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.
dblock110
Posts: 3
Joined: Mon Jan 16, 2006 3:07 pm

Post by dblock110 »

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
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

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
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

Sam, your links on that forum
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..
dblock110
Posts: 3
Joined: Mon Jan 16, 2006 3:07 pm

Post by dblock110 »

can sum1 re up that grapher...
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

Start here

print("Result = ".. 1+1)
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

WHOOPS! Sorry!
rscx.com/pspe
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

have you made any progress, dblock? m.
Post Reply