cl-glut pre-study
なんやかんやと試してみた結果、課題のレポートとして、以下のプログラムを提出させていただきます。 歩くというよりランニングしているようにも見えますが、一応完成ということで単位をくださいな。common lispですけど。 あ!、インターネット聴講生だから…
歩く姿をsinとcosを使用して実験してみた。 正面だと分かりにくいので、移動を止めて斜め45度の角度から動きを確認してみる。 試してみると、腕や脚の移動範囲を25度位の角度にすると何となく歩いている感じに見えた。 角度だけでなくいろいろな数値をいじっ…
歩いてはいないが、グラウンド上を円形に滑るように動くプログラムは意外と簡単にできる。 しかし、マウスボタンの真ん中を押すと止まるだけなはずなのに、右ボタンと同様に少しずつ動くのはなんなのさ? どこまちがえてんだろ? BoxMan sliding! ;; ;; Box…
勝手に聴講生になったので、どのグループでもないから予備の課題を選び、取り合えずは表示のみ。 やっぱりこれでしょ。何だかわかるかな? BoxMan standing! ;; ;; BoxMan standing ;; -------------------------------------------------------------------…
さて、ここも一気にいってみよう。レッスン21.光を当ててみる ;; ;; lesson21 <shading> ;; ----------------------------------------------------------------------------------------------- (defparameter *vertex* #(#(0.0 0.0 0.0) #(1.0 0.0 0.0) #(1.0 1.</shading>…
なかなかいいサンプルがあったので、レッスン17を以下のように変えてみた http://blog.lowsnr.net/2013/04/14/using-opengl-with-common-lisp-and-macos-x/ ;; ;; lesson17 <animation> ;; ------------------------------------------------------------------------</animation>…
レッスン13.2次元と3次元 y軸を中心に25°回転してみた。 ;; ;; lesson13 <2D & 3D> ;; ----------------------------------------------------------------------------------------------- ;; Set window class (defclass Window (glut:window) () (:…
レッスン8.マウスボタンをクリックする ;; lesson1 <Open the window> ;; lesson2 <Fill in the blue> ;; lesson3 <Draw the lines> ;; lesson4 <Put the color lines> ;; lesson5 <Set polygon and several colors> ;; lesson6 <Reshape > ;; lesson7 <Window size and position> ;; lesson8 <mouse> ;; ----------------------------------…</mouse></window></reshape></set></put></draw></fill></open>
さて3日目。 レッスン6.座標軸とビューポート ;; ;; lesson1 <Open the window> ;; lesson2 <Fill in the blue> ;; lesson3 <Draw the lines> ;; lesson4 <Put the color lines> ;; lesson5 <Set polygon and several colors> ;; lesson6 <Reshape > ;; ------------------------------------------------------------------------------------…</reshape></set></put></draw></fill></open>
聴講2日目はここからスタート。レッスン3.線を引く lesson3.lisp ⇒ ;; ;; lesson1 <Open the window> ;; lesson2 <Fill in the blue> ;; lesson3 <Draw the lines> ;; ----------------------------------------------------------------------------------------------- ;; Set window class (defclass Windo</draw></fill></open>…
これまでは、HSPで作られたシューティングゲーム2本をcommon-lispでリメイクしてみた。 lispbuilder-sdlは結構便利で、若干古さは否めないものの簡単なゲームを作るには十分だと感じた。 だけど、グラフィックスと言えばopenGLは外せない。 なので、どこま…