The method we use

This page was last modified on the 19th of June, 1997.

The four steps

Click on the numbers to go directly to the step you're interested in.

Arrow 1

First step : Calculate the coordinates
with a program

To create any object, the first thing you'll have to do anyway is to tell the computer where its characteristic points are. It is not impossible to do that manually with a modeling software, and may seem much easier. But this is extremely slow, almost impossible to modify and rarely accurate.

We consider a much better method to calculate the coordinates with a Basic program. Of course, nothing forbids you to do that in Pascal, C++ or any other programming language. But we already wrote some simple Basic listings in which you'll only have to add a few lines to do that work quickly.

Of course, this program will not only calculate the points: it will also store its results in an ASCII text file.

It would not be impossible to write this file directly in a standard format, such as AutoCAD DXF or VRML. But, in the VR Cocha club, we prefer to write these instructions according to our special syntax, on the one hand because it is much easier, and on the other hand because it will be possible to translate the result automatically to various standard formats - not to a single one, whatever its qualities may be. We do not pretend our format is the best, far from that. We just say we can easily translate it to many other formats, and not only to VRML, and not only to 3D Studio or anything else.

Arrow 2

Second step : Check the source file
with any word processor

As the source file produced by the Basic program is a plain ASCII text, it is easy to check it rapidly with any word processor (we recommend a very simple one, such as the DOS Edit, or the Windows Notepad). This control is not supposed to be useful... but of course it is. You will not have to read the file line by line. Just have a look, just in case. It will very often be enough to notice very common mistakes: missing lines, coordinates set to 0 because you used a wrong variable name in your listing, etc.

Of course, at the beginning, you will begin the process at that step, and write the source file manually with your word processor, not with a Basic listing. That will help you to understand our syntax. As this manual work is not so uneasy, maybe some of you will think it is not even necessary to write a Basic listing. We think this is wrong... but we do not forbid you to create your first objects that way.

Arrow 3

Third step : Translate the source file
to a standard format

We are pleased to tell you that no knowledge of the Basic syntax is needed at all for that step. Just open our translating program listing with your Qbasic interpretor (given for free with any recent DOS or Windows 95 version) and make it run. You'll only need a very basic knowledge of the DOS syntax to tell the program where the source file is and where you want to save the translated file. But of course, if you understand the Basic syntax, you will be able to modify some lines here and there, to allow the listing to read and write directly your common files without even begging permission.

Arrow 4

Fourth step : Use the result
with your common 3D software

And that's all. Read the result with your common software (that may be a VRML freeware browser) and do what you want with it using your common software. You can do with it everything that you do with your manually-created files: ray-tracing, shadows, painted faces, extrusions, etc. You can store all that in your common format if you're not confident with ours. You are not prisoners of our format.

Of course, at the beginning, you will probably not be satisfied with the object your first Basic listing will have produced, and that means you will have to modify the origin of all that: the first Basic listing. Major hassle: three or four lines to modify. Oh yes, that's right, you will have to follow the whole four steps once again.

You think this is slow? You're wrong. With a little practice, you will understand this is at least ten times quicker than a totally manual process... and much more powerful.

As you will have noticed by yourself, our Basic programs do not use any graphical instruction, such as SCREEN, LINE or PSET. All the graphics are managed by your VRML browser or modeling software. They're much better for that, why should we deny it? But the Basic listings are much quicker to calculate the coordinates, we do not pretend more.

Back to the VR Cocha home page
This page hosted by Get your own Free Home Page