Prefuse is a very nice visualization toolkit. It is written in Java, it uses Java2D APIs to draw nodes, edges, and other visual items. It also handles events, supports animations, and other things you need to make the visualization become interactive.
The visualization display is implemented on top of JComponent. So it is very easy to embed it on another application, like what I did in LuaDeskSpot (source).
Okay, enough for the introduction. The purpose of this post is I want to show you how to use Prefuse through Jython. Yes, to make Prefuse (er.. Java, actually) scriptable!
Prefuse is a very nice visualization toolkit. It is written in Java, it uses Java2D APIs to draw nodes, edges, and other visual items. It also handles events, supports animations, and other things you need to make the visualization become interactive.
The visualization display is implemented on top of JComponent. So it is very easy to embed it on another application, like what I did in LuaDeskSpot (source).
Okay, enough for the introduction. The purpose of this post is I want to show you how to use Prefuse through Jython. Yes, to make Prefuse (er.. Java, actually) scriptable!
Prefuse is a very nice visualization toolkit. It is written in Java, it uses Java2D APIs to draw nodes, edges, and other visual items. It also handles events, supports animations, and other things you need to make the visualization become interactive.
The visualization display is implemented on top of JComponent. So it is very easy to embed it on another application, like what I did in LuaDeskSpot (source).
Okay, enough for the introduction. The purpose of this post is I want to show you how to use Prefuse through Jython. Yes, to make Prefuse (er.. Java, actually) scriptable!
I was wondering can I somehow transmit TUIO data to a browser. So I can use javascript and of course HTML and friends to build a (not really) web based multitouch application. I found no available libraries.. well maybe because it is just ridiculous to implement such thing. But hey, it’s fun to have one! So, I decided to give a try.
The first problem is browser speaks HTTP and TUIO uses OSC things over UDP. Actually, creating a TUIO application using Flash also face this kind of problem. But already have a translator that converts TUIO data (which uses OSC over UDP) to XML data that flash accepts which uses TCP connection. So, if I want to have the TUIO data arrived at the browser, I have to transmit it over HTTP.
Beside that, the tracker transmit a data when a touch event happens. In other words, the TUIO data has to be transmitted right into the browser immediately after it is produced. But, as we know, in (ordinary) HTTP connection, browser is the one who initiate connection, not the server. So, how to solve this?
Then.. i remembered Comet! It’s a concept of pushing data to a browser. Exactly fits what I need. Well.. new problem came since I couldn’t found a simple and ready to use library. One requires me to install Jetty. I tried but didn’t know what to do 😀 so I tried to find another solution. Then I stumbled upon a great tutorial that gave me more keywords for google! It was orbited, stomp, and morbidq which all share another keyword: simple 😀
After coding for several.. err.. hours, i guess, finally now I have a working prototype! See the screencast below.
Basically, there is a script that reads TUIO data from tracker. Then it transmit the data to a message queue that supports stomp. Script inside the browser then takes data from the message queue (or the other way around?) and process it. Communication between the message queue and browser is handled by the orbited. I don’t really know what happens inside =D
I was wondering can I somehow transmit TUIO data to a browser. So I can use javascript and of course HTML and friends to build a (not really) web based multitouch application. I found no available libraries.. well maybe because it is just ridiculous to implement such thing. But hey, it’s fun to have one! So, I decided to give a try.
The first problem is browser speaks HTTP and TUIO uses OSC things over UDP. Actually, creating a TUIO application using Flash also face this kind of problem. But already have a translator that converts TUIO data (which uses OSC over UDP) to XML data that flash accepts which uses TCP connection. So, if I want to have the TUIO data arrived at the browser, I have to transmit it over HTTP.
Beside that, the tracker transmit a data when a touch event happens. In other words, the TUIO data has to be transmitted right into the browser immediately after it is produced. But, as we know, in (ordinary) HTTP connection, browser is the one who initiate connection, not the server. So, how to solve this?
Then.. i remembered Comet! It’s a concept of pushing data to a browser. Exactly fits what I need. Well.. new problem came since I couldn’t found a simple and ready to use library. One requires me to install Jetty. I tried but didn’t know what to do 😀 so I tried to find another solution. Then I stumbled upon a great tutorial that gave me more keywords for google! It was orbited, stomp, and morbidq which all share another keyword: simple 😀
After coding for several.. err.. hours, i guess, finally now I have a working prototype! See the screencast below.
Basically, there is a script that reads TUIO data from tracker. Then it transmit the data to a message queue that supports stomp. Script inside the browser then takes data from the message queue (or the other way around?) and process it. Communication between the message queue and browser is handled by the orbited. I don’t really know what happens inside =D
I was wondering can I somehow transmit TUIO data to a browser. So I can use javascript and of course HTML and friends to build a (not really) web based multitouch application. I found no available libraries.. well maybe because it is just ridiculous to implement such thing. But hey, it’s fun to have one! So, I decided to give a try.
The first problem is browser speaks HTTP and TUIO uses OSC things over UDP. Actually, creating a TUIO application using Flash also face this kind of problem. But already have a translator that converts TUIO data (which uses OSC over UDP) to XML data that flash accepts which uses TCP connection. So, if I want to have the TUIO data arrived at the browser, I have to transmit it over HTTP.
Beside that, the tracker transmit a data when a touch event happens. In other words, the TUIO data has to be transmitted right into the browser immediately after it is produced. But, as we know, in (ordinary) HTTP connection, browser is the one who initiate connection, not the server. So, how to solve this?
Then.. i remembered Comet! It’s a concept of pushing data to a browser. Exactly fits what I need. Well.. new problem came since I couldn’t found a simple and ready to use library. One requires me to install Jetty. I tried but didn’t know what to do 😀 so I tried to find another solution. Then I stumbled upon a great tutorial that gave me more keywords for google! It was orbited, stomp, and morbidq which all share another keyword: simple 😀
After coding for several.. err.. hours, i guess, finally now I have a working prototype! See the screencast below.
Basically, there is a script that reads TUIO data from tracker. Then it transmit the data to a message queue that supports stomp. Script inside the browser then takes data from the message queue (or the other way around?) and process it. Communication between the message queue and browser is handled by the orbited. I don’t really know what happens inside =D
Bosen ngerjain tesis, trus nemuin contoh kodingan menarik ttg simulasi air. Jadi kepikiran tuk porting kodingan tsb supaya bisa menerima multiple input via TUIO. Voila! jadilah aplikasinya =P
$ git clone git://github.com/fajran/multitouch-water-simulation.git water
$ cd water
$ make
$ ./water
Pastikan udah nginstall g++, libsdl1.2-dev, libsdl-image1.2-dev, dan bbrp library lain kalo ada (saya gak merhatiin =P). Tuk simulator multitouch table, bisa make buatan reacTIVision.
Bosen ngerjain tesis, trus nemuin contoh kodingan menarik ttg simulasi air. Jadi kepikiran tuk porting kodingan tsb supaya bisa menerima multiple input via TUIO. Voila! jadilah aplikasinya =P
$ git clone git://github.com/fajran/multitouch-water-simulation.git water
$ cd water
$ make
$ ./water
Pastikan udah nginstall g++, libsdl1.2-dev, libsdl-image1.2-dev, dan bbrp library lain kalo ada (saya gak merhatiin =P). Tuk simulator multitouch table, bisa make buatan reacTIVision.
Rasanya dulu saya pernah melakukannya.. dan memang pernah =D
Setelah sebelumnya saya membuat screencast, maka agar dapat ditampilkan di web saya perlu mengubah formatnya menjadi format yang umum “diterima”, misalnya Flash Video alias FLV. Urusan konversi ini saya serahkan ke aplikasi mencoder.
Jangan tanya saya apa arti dari setiap parameter yang ada, soalnya saya ngga tau =D Oya, saya sedang membuat screencast tanpa suara jadi memang seluruh opsi yang berhubungan dengan suara tidak saya gunakan.
Tuk ngubah2 kualitas, bisa diatur nilai dari bitrate yang ingin digunakan. Contoh di atas menggunakan bitrate 2500 yang cukup menghasilkan hasil yang bagus untuk kasus saya. Lihat contoh videonya di bawah ini. Garis-garis yang ada cukup terlihat bagus dan tidak terlalu berbercak.
Rasanya dulu saya pernah melakukannya.. dan memang pernah =D
Setelah sebelumnya saya membuat screencast, maka agar dapat ditampilkan di web saya perlu mengubah formatnya menjadi format yang umum “diterima”, misalnya Flash Video alias FLV. Urusan konversi ini saya serahkan ke aplikasi mencoder.
Jangan tanya saya apa arti dari setiap parameter yang ada, soalnya saya ngga tau =D Oya, saya sedang membuat screencast tanpa suara jadi memang seluruh opsi yang berhubungan dengan suara tidak saya gunakan.
Tuk ngubah2 kualitas, bisa diatur nilai dari bitrate yang ingin digunakan. Contoh di atas menggunakan bitrate 2500 yang cukup menghasilkan hasil yang bagus untuk kasus saya. Lihat contoh videonya di bawah ini. Garis-garis yang ada cukup terlihat bagus dan tidak terlalu berbercak.
Akhirnya saya menemukan salah satu cara untuk membuat screencast berkualitas tinggi, yaitu dengan bantuan ffmpeg. Intinya adalah kita menyuruh si ffmpeg tuk merekam langsung sesi X11 yang ada, nanti si ffmpeg akan langsung meng-encode si video ke file dalam format dan pengaturan yang menurut saya cukup bagus. Entah apa itu 😀
okeh.. masalah selanjutnya adalah bagaimana cara mengkonversi formatnya menjadi format yang lebih bersahabat dengan web (flv? h264?) dan tetap mempertahankan kualitas.. perburuan masih berlanjut =D
Akhirnya saya menemukan salah satu cara untuk membuat screencast berkualitas tinggi, yaitu dengan bantuan ffmpeg. Intinya adalah kita menyuruh si ffmpeg tuk merekam langsung sesi X11 yang ada, nanti si ffmpeg akan langsung meng-encode si video ke file dalam format dan pengaturan yang menurut saya cukup bagus. Entah apa itu 😀
okeh.. masalah selanjutnya adalah bagaimana cara mengkonversi formatnya menjadi format yang lebih bersahabat dengan web (flv? h264?) dan tetap mempertahankan kualitas.. perburuan masih berlanjut =D
Pake apa ya? Yang bisa bikin video dengan kualitas tinggi dan tidak terputus-putus.
Barusan nyoba recordmydesktop, xvidcap, dan istanbul. Tapi tidak ada yg cocok. Kompresi tidak bisa diatur, terputus2, dan sebagainya. xvidcap malah crash saat mau mulai merekam. recordmydesktop (melalui gtk-recordmydesktop) juga gagal ketika saya mau mengambil video tidak dalam modus satu layar penuh. istanbul kayanya lebih lumayan dibanding dua yang lain (karena bisa saya pakai =D). Tapi tetap hasilnya tidak sesuai keinginan saya.
Contoh video:
Terlihat terputus-putus padahal aplikasinya sendiri jalan dengan sangat lancar di komputer saya.
Kualitasnya juga tidak bisa berkualitas tinggi. Er.. mungkin faktor konversi dari ogg ke flv juga sih. Tapi video dalam format ogg-nya sendiri jg tidak mulus tampilannya.
Sebelumnya saya pernah membuat screencast di Mac OS X dengan Jing. Hasilnya bagus sekali. Bisa dilihat di tulisan saya sebelumnya.
Ada saran? ada yang pengalaman?
Pake apa ya? Yang bisa bikin video dengan kualitas tinggi dan tidak terputus-putus.
Barusan nyoba recordmydesktop, xvidcap, dan istanbul. Tapi tidak ada yg cocok. Kompresi tidak bisa diatur, terputus2, dan sebagainya. xvidcap malah crash saat mau mulai merekam. recordmydesktop (melalui gtk-recordmydesktop) juga gagal ketika saya mau mengambil video tidak dalam modus satu layar penuh. istanbul kayanya lebih lumayan dibanding dua yang lain (karena bisa saya pakai =D). Tapi tetap hasilnya tidak sesuai keinginan saya.
Contoh video:
Terlihat terputus-putus padahal aplikasinya sendiri jalan dengan sangat lancar di komputer saya.
Kualitasnya juga tidak bisa berkualitas tinggi. Er.. mungkin faktor konversi dari ogg ke flv juga sih. Tapi video dalam format ogg-nya sendiri jg tidak mulus tampilannya.
Sebelumnya saya pernah membuat screencast di Mac OS X dengan Jing. Hasilnya bagus sekali. Bisa dilihat di tulisan saya sebelumnya.
Setelah semalem nyobain Jython, jadi kepikiran tuk make Prefuse dari Jython. Ternyata bisa! Utak-atik dikit lagi, dan jadilah sesuatu yg lebih menarik. Silakan lihat di screencast berikut =P
Setelah semalem nyobain Jython, jadi kepikiran tuk make Prefuse dari Jython. Ternyata bisa! Utak-atik dikit lagi, dan jadilah sesuatu yg lebih menarik. Silakan lihat di screencast berikut =P