just another diary

Saturday, November 22, 2008

Next, please!

Ok, I canceled this latest change. But the library is implemented (well, taken...) and can be used any time.
The main reason for cancellation is that I get and absorb the information faster than I implement "the best" idea I have for the moment. And that lazy computation can tie me too much. Anyway, it isn't Haskell. Alas.
So, now the best idea is this:
I design the language like LEGO, i.e. the language that permits to work with blocks of calculations. I imagine it like Houdini net editor or something like that with textual description. Maybe it will be XML.
I haven't decided yet.

Thursday, October 2, 2008

Streams.

Impressed by lectures of Gerald Jay Sussmann and Harold Abelson, I decided to put the streams into the rendering engine to simplify it and to add lazy calculations. I'm too "imperative" and it takes some time and pain to move to functional style.

One may say "First implement it and then play", but I desagree. Features are just a bunch of code which will prevent me from doing any changes. So now is the most correct time.

Monday, September 29, 2008

Self-testing.


So there is new feature in the renderer available.
It is a testing framework from the "Practical Common Lisp" book. The book is awesome and I recommend it for reading for everyone who did not read it yet.
Anyway, I took the "framework" as it is without changes: it suits well as it is.
So, not too much, but the code is revisited a little bit and, anyway, it is a progress.
One small step is better than nothing...
By the way, on the picture one can see the new "checker" shader: it shows V direction with white and U direction with solid color, putting the round mark at the first vertex in the list.

Tuesday, August 26, 2008

Path tracing.

For the main loop I decided to use path tracing as the most simple and more or less acceptable solution. So, now I'm working on it.
The bidirectional path tracing appeared to be not so easy to implement. I just could not find enough description and formulas for it. Anyway, I can implement it later, it's not so important for now.
So I'm working on the basic path tracing.

Tuesday, August 19, 2008

SBCL, CLISP, CMUCL.

I spend already two or three days trying to run EMACS+SLIME+SBCL under my WinXP and Vista Home.
So eventually I found that I use AMD Athlon64 processor. That means for example that SBCL 1.0.19 doesn't work but SBCL 1.0.13 does. So I switched to SBCL 1.0.13.
I also use "Ubuntu+CMUCL+EMACS+SLIME" for this task (under virtual machine).

Sunday, August 17, 2008

Simplification.

So I added packages into the project.
And this feature added one unexpected problem: the code seems to be slower. Much slower. Even after compilation. Anyway, the optimization will be done a little bit later.

Wednesday, August 6, 2008

Books about raytracing.

So, I've got two new books:
  1. 3d computer graphics. a mathematical introduction with opengl.
  2. realistic image synthesis using photon mapping.
thanks to http://www.pdfchm.com/

Anyway, the information I searched for is available in these books: general ray tracing. And the second book looks interesting: I was always interested in global illumination methods at all and particular in photon mapping.

Monday, August 4, 2008

The first draft render.

So, here is the first test result.



The rendered data is:

(list
(make-t3d :v0 (make-v3d :x -3 :y 2 :z 0)
:v1 (make-v3d :x -4 :y 2 :z 2)
:v2 (make-v3d :x 1 :y 6 :z 0)
:color '"255 100 0")

(make-t3d :v0 (make-v3d :x -3 :y 4 :z 0)
:v1 (make-v3d :x 4 :y 4 :z -5)
:v2 (make-v3d :x 4 :y 4 :z 5)
:color '"0 255 0")
)

Cameras are:
(list
(make-c3d :from (make-v3d :x 0 :y -3 :z 0)
:to (make-v3d :x 0 :y 0 :z 0)
:up (make-v3d :x 0 :y 0 :z 1)
:d 5
:w-px 320
:h-px 256
:w-m 10
:h-m 8)
)

Lights were not used.

Wednesday, July 30, 2008

Ok. Let's begin.

So I decided to write a raytracer engine using LISP.
The "first step" is available.
It does nothing except for one important thing: being the first step, it empowers me to continue work on it.

My Blog List

Powered by Blogger.