Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Levak

Pages: 1 ... 36 37 [38] 39 40 ... 68
556
TI-Nspire / Re: [Lua] Tiny3D
« on: October 01, 2011, 12:54:53 pm »
Strange, really strange.

557
TI-Nspire / Re: [Lua] Tiny3D
« on: October 01, 2011, 10:32:11 am »
line 49 : I think you'd better use

count = 0
...
for ...
 count = count + 1
 faces2[count] = faces[j]
end
...
table.setn(faces2, count)

instead of table.insert which is 7 times slower.

EDIT : it seems that table.setn is depreaciated. Just test that without it and only if #faces2 is egual to 0, use it.

558
TI-Nspire / Re: [Lua] Tiny3D
« on: October 01, 2011, 07:40:25 am »
It does not... It only calculates the angle with the camera.
I wasn't talking about that, but I think I will look at it since I think Make3D uses an old and heavy method with face normal calculations.

Quote
But to choose which polygon I draw first, I use table.sort(). Is that bad ?
It depends on how table.sort() is implemented. We have to make benches about that :
 - insert element at it right place with table.insert(e, n) while computing it (mine)
 - compute elements, then table.sort(l, fun) (your)

Quote
And I don't say that it's fast, but it is fast enough to be playable...
(Actually It's just a bit faster than Make3D, so I think I could optimize)
Make3D really slows down in shading view when we reach the limit of 200 faces displayed. It comes really fast since a 15*15 grid is 225 points and about 200 faces.
This is why I was curious of what method you used without looking at your sources :D

559
TI-Nspire / Re: [Lua] Tiny3D
« on: September 30, 2011, 05:44:14 pm »
Does your Shading mode use the crappy table.sort() I saw in previous versions ? or did you change it ?
I just wish to find what method you used to render that as fast as you say (I didn't tried yet, you just judges that it is fast :D).

560
TI-Nspire / Re: NYAN NYAN NYAN NYAN ... this is the game :D
« on: September 29, 2011, 02:31:56 pm »
Yeah yeah ... someone already told me that .... but it is a crappy timer bug that I can't figure out. =(

561
TI-Nspire / Re: [Lua] Make3D
« on: September 28, 2011, 04:35:36 pm »
A really simple and little mouse selection system today ...
(bounding box and depth based)



Everything is pre-cached during the render part, so that it won't compute two times the same thing =)

562
TI-Nspire / Re: [Lua] Tiny3D
« on: September 28, 2011, 12:40:55 pm »
On my Clickpad.
Which one is the slowest ?
The CX =)

Computer Software > ClickPad/TouchPad > CX
I thought CX was faster because it didn't have to do grayscale conversion. Or is that just for gc:drawImage()?

I don't use drawImage() in Make3D and it is farly slower on the CX. With both Nspires rendering the same thing, the ClickPad goes faster to animate my default scene.

563
TI-Nspire / Re: [Lua] Make3D
« on: September 27, 2011, 05:02:23 pm »



 - no more infinite points behind the virtual camera (no camera yet, but it should come)
 - transparent mode
 - object label is displayed in every modes
 - Some invisible micro-features like  Shift+Z to switch backward in display modes (Z lets you switch forward)

What "should" be there in the future
 *- real camera that enables you to really move in 3D space
 *- Grid ?
 *- adding objects like cubes, cylinders etc ...
 *- edit mode that let you play with vertex and faces
 ***-> it requires a lot of features in face manipulations (recalculate normals outside, flip normals, syncronisations of mesh based datas, etc ...)
 *- selection by cursor
 ***-> it requires a simple raytracer function (I've done that before but it involves huuuge formulas ...)
 ***-> I'm certainly kidding, or mad, but ... it could go in another way :D A RayTracer on the Nspire ? :DDD


Bonus :


564
@Levak:
Nope, the x86-Version should work on any Mac with an Intel processor (built since 2005/2006, should run on Mac OS X >= 10.4), I only provide a x86_64 version for those who really want to use 64-Bit (which should have no effect on Luna^^)

Mac has changed ? :o
Ok, troll off :D

565
Luna v0.2a is now available with several bug fixes. Sorry for this unable v0.2.
http://ndlessly.wordpress.com/2011/09/27/luna-bug-fixes/

Do you plan to include a Linux and a Mac build the next time (or does this one already feature it)? For people who can't build one themselves, it'd be neat.

You should specify which Linux distro and which Mac version... cuze Windows is AFAIK the only one where it is "hard" to compile and where a compiled *.exe is the same for everyone.
Don't you think ?

566
TI-Nspire / Re: [Lua] Tiny3D
« on: September 26, 2011, 02:32:51 pm »
How do you use this library? Like, how should you store the data to render a 3D object?
Two ways I guess :
1) library, like I made for Make3D
2) Using its source code

567
Code: [Select]
echo $(perl -0777 -pe 's/(.*&lt;r2dtotree&gt;|&lt;\/r2dtotree&gt;.*)//gsm' dump.xml | sed "s/&lt;node name=&quot;1para&quot;&gt;/\x0D/g;s/&lt;\/*node[^g]*&gt;//g;s/&lt;\/*leaf[^g]*&gt;//g;s/&lt;cursor[^g]*&gt;//g;s/&amp;quot;/\"/g;s/&amp;apos;/'/g;s/&amp;lt;/</g;s/&amp;gt;/>/g" | sed 's/&amp;/\&/g' ) > dump.lua



is the code to get the source code form the xml file of a lua program coded using oclua (TI-Notepad) :D

568
Levak: You could create a file containing all the debugger commands to enter:
then run: nspire_emu ... /D < commands.txt

Thanks !

Here is my working dumper thanks to your help :
Code: [Select]
function dump {
local winePath="$HOME/.wine/dosdevices/c:"
local rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
local size=$(zenity --entry --title="Taille du classeur à dumper (octets)" --entry-text="0");
let num=$size/170
echo "k 10032AA0 +x" > "$RELPAT/commands.txt"
echo "c" >> "$RELPAT/commands.txt"
local i=0
while [ $i -le $num ]; do
# Complete tempory file names with zeros so that it's listed correclty
let local dif=${#num}-${#i}
local spaces=$(printf "%"$dif"s")
local zeros=${spaces// /0}
# Fill command list
echo "w C:\dump$zeros$i.xml r1 r2" >> "$RELPAT/commands.txt"
echo "c" >> "$RELPAT/commands.txt"
let i=$i+1
done

# Launch emulator with debug command list
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /D < "$RELPAT/commands.txt"

# Concatenate final XML file using tempory files
echo -n "" > "$RELPAT/dump.xml"
for f in "$winePath/dump*"; do
cat $f >> "$RELPAT/dump.xml"
done
rm "$winePath/dump*"
rm "$RELPAT/commands.txt"
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}
> bash 4 linux
> requires zenity
> requires wine
> only works with OS 3.0.1 AND NONCAS roms.

EDIT : it can easily be added to my bash launcher
47 +                "dump" "Dumper un classeur (Ctrl+S -- dump.xml)" \
177 + (the code above)
271 +          elif [ "$select_noncas" = "dump" ]; then
            dump

569
!summon Goplat :
Can you debugger be interfaced with a scripting language ?
I mean bashing actions like this one :

-> k 10032aa0 +x
-> c
-> Ctrl+S
-> w C:\dump.xml r1 400
-> c
-> w C:\dump.xml r1 400
-> c
-> w C:\dump.xml r1 400
...
n time ...
-----> Dump of a document.

EDIT : well, I guess that integrated plugins would be really great, isn't it ? :D

570
Would it be possible to use it in order to get text from a TNS file without TI-Nspire Computer software ?

With an emulator and a memory dump ... but it is really messy

Pages: 1 ... 36 37 [38] 39 40 ... 68