Author Topic: [Lua] Make3D  (Read 40402 times)

0 Members and 1 Guest are viewing this topic.

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #60 on: August 02, 2011, 03:17:37 pm »
Congrats !
This program becomes really awesome.

PS : I haven't tested that new version, but in the previous one, if you use any tool (grab, scale or rot) and type two double quotes (""), the prog returns an error.
« Last Edit: August 02, 2011, 03:18:05 pm by Chockosta »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #61 on: August 02, 2011, 04:25:44 pm »
PS : I haven't tested that new version, but in the previous one, if you use any tool (grab, scale or rot) and type two double quotes (""), the prog returns an error.

Oh, good find ... And I can't explain this ... I can block the quotes, since it is useless in a math expression, but it seams that math.eval() return a mathematical value to "" =D
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #62 on: August 02, 2011, 07:09:41 pm »
One More thing i have to tell them :P
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #63 on: August 02, 2011, 07:23:43 pm »
You can also let on.save return the highscore as a list. This will then be the parameter of on.restore next time the script gets opened :)
Bullet-proof :p

Dude, I love you T_T

Now, we don't loose the screen configuration when we exit from the document \o/  \^o^/  (o_  /o\
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #64 on: August 02, 2011, 09:15:42 pm »
Ok, today, acording to the previous post, I worked on the user's comfort.
 - 3D axes
 - Angular mode displayed : RAD or DEG mode
 - vignetting support (platform:gc() is definitely not gc)
 - save and restore supprot (GUI configuration is saved)



« Last Edit: August 02, 2011, 09:16:08 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #65 on: August 02, 2011, 11:12:09 pm »
Great work !

platform:gc() is definitely not gc

in what way ... ?
« Last Edit: August 02, 2011, 11:13:52 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #66 on: August 03, 2011, 05:18:55 am »
Great work !

platform:gc() is definitely not gc

in what way ... ?

In the way that platform:gc() is a constructor of a gc item.
The gc item passed to on.paint() has already been initialized with gc:begin() (this is a part of the bug of adding gc:begin() in on.paint() ) and is automaticly closed with gc:finish().

That way, if you use platform:gc() you have to initialize it first with gc:begin()

Here is a pseudo code of the core :

Code: [Select]
if platform.window.isInvalidate() then
  local gc = platform.window:gc()
  gc:begin()
  on.paint(gc)
  gc:finish()
end

And here comes another problem, if we use platform:gc() to draw things, it will give you the illusion that it is the same, but actually no. When you do a Ctrl+Up the vignettes are not drawn and the part you wish to draw is in background ! This is a little bug of gc, because you didn't put a gc:finish() in the function that uses platform:gc()
« Last Edit: August 03, 2011, 05:22:14 am by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #67 on: August 03, 2011, 05:59:12 am »
Hmm, very interesting!
Thanks for pointing it out :)

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #68 on: August 04, 2011, 12:12:27 pm »
I downloaded a .zip from your site, and it has 4 TNS files in it:
Make3D_exemple.tns
Make3D_v9.3a.tns
mk3d_lib_gui.tns
mk3d_lib.tns
Which one(s) should I send to my calc?

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #69 on: August 04, 2011, 01:20:05 pm »
I downloaded a .zip from your site, and it has 4 TNS files in it:
Make3D_exemple.tns
Make3D_v9.3a.tns
mk3d_lib_gui.tns
mk3d_lib.tns
Which one(s) should I send to my calc?

None of them because it is not the zip file that you should download since it is the TI-BASIC version I used to update.

This one is the one :
http://levak.free.fr/ftp/nspire/Make3D/Make3D.tns
« Last Edit: August 04, 2011, 01:20:20 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #70 on: August 09, 2011, 10:56:35 am »
Salut! J'ai vu que tu as fait un moteur, c'est cela?
Ton système est-il utilisable en C? Je prévois un petit moteur 3D pour g35+/75/85/etc... en C, maiis je manque cruellement d'infos.
Tu pourrais m'aider? Merci d'avance;

PS: Je comprends très bien le Lua.

Hello! I saw you've done a 3D motor. Is it right?
Is your system usable on C? I want to make a 3D motor for Fx-9860Sd and co., but I miss many infos.
Can you help me. Thanks.
PS: I understand well Lua.

Post reply: I dont know why i posted only in french, maybe beacause you're french too. :/
« Last Edit: August 09, 2011, 12:28:49 pm by Eiyeron »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #71 on: August 09, 2011, 11:02:12 am »
Spoiler For not useful anymore:
Salut! J'ai vu que tu as fait un moteur, c'est cela?
Ton système est-il utilisable en C? Je prévois un petit moteur 3D pour g35+/75/85/etc... en C, maiis je manque cruellement d'infos.
Tu pourrais m'aider? Merci d'avance;

PS: Je comprends très bien le Lua.
_______________________________
Translation ;D
Hi! I saw you made an engine, right ?
Is your system usable in C ? I foresee a little 3D engine for g35+/75/85/etc... in C, but I don't have enough informations.
Could you help me ? Thanks by advance;

PS: I understand Lua a lot
_______________________________
PS2: Not everyone understand every language a lot, so French is welcome in the French section but here, English is better ;)
PS3: I am French too so sorry if the translation is not good.
XBOX360: Also, welcome in the forums ;D, you can introduce yourself here.
« Last Edit: August 09, 2011, 12:38:33 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #72 on: August 09, 2011, 12:22:39 pm »
Okay, i misunderstood, excuse-me. I'll modify.
« Last Edit: August 09, 2011, 12:23:50 pm by Eiyeron »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #73 on: August 09, 2011, 12:36:38 pm »
Salut! J'ai vu que tu as fait un moteur, c'est cela?
Ton système est-il utilisable en C? Je prévois un petit moteur 3D pour g35+/75/85/etc... en C, maiis je manque cruellement d'infos.
Tu pourrais m'aider? Merci d'avance;

PS: Je comprends très bien le Lua.

Hi,
I followed a C programming tutorial for the basic knowledge (maths and so ..) 3 years ago but I can't find it via Google. It seems it has disappeared ...
Anyway, the basic formulas are in Engine.lua. Other files are related to the GUI and Lua management.

But you'll have to make a real effort to use this method in C, since I completely changed my mind during its integration : 1D list for all points (instead of a n*3)
« Last Edit: August 09, 2011, 12:40:21 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #74 on: August 09, 2011, 12:44:03 pm »
ProjectPoint(obj, obj[i+1], obj[i+2], zoffset)
I see, it's just {x,y,z}... Just what i thought first. i will study it. Thanks!
Is anything i must know to understand it?