back to list

Re: Dekany in VRML

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

11/14/2000 11:40:19 AM

Hi Paul,

>I guess the most important things to be able to play in each dekany are the
5 tetrads and 30 triads. If it's graphically feasible to also include the
dyads and monads, do so . . . I'll make 150 sound files (eventually . . .).

Right, in that case I'll do you both.

Without diads:
http://members.nbci.com/_XMCM/tune_smithy/dekany/dekany_template.txt
With diads:
http://members.nbci.com/_XMCM/tune_smithy/dekany/dekany_with_diads_template.txt
(I've called them text files since they are not valid VRML until you do the S&R)

N.B. just realised it is de_k_any, so renamed everything accord.

>Hey, how about using little spheres for the monads, little cylinders for the
diads, and little prisms for the triads (and in the 3)5, little tetrahedra
for the tetrads)? Should make using and understanding this a whole lot
easier.

Interesting idea.

Maybe I'll do tetrahedra for the 3)5, - nice thing about those is that
because of the high degree of symmetry one won't need to do much
figuring out to decide the orientation for them.

The cylinders and prisms are more tricky (assuming you want them to
line up nicely and symmetrically).

If one uses the most obvious kind of approach, you have to figure out the
directions of the axes of the cylinders / prisms as 3D vectors
for each one, and then having done that, need to figure out what 3D axis to
rotate about, and by how much, to get to that direction from the VRML default
of vertically upwards - (though luckily I have little app. I did that works out the
second half of this calc. automatically)
= 30 3D rotations to figure out to do the cylinders, and another 30 for the prisms.

- I think I'll pass on that for now, but think it over and see if there is any
easier way to do it.

Good thing about this is that once you've done the audio clips, one can
put as many VRML files using them as one likes in the same directory.

E.g. one could have a whole range for varying xx, so varying perspective views.

Here is the console app for making the VRML from the template:

http://members.nbci.com/_XMCM/tune_smithy/dekany/srvrml.exe

It's for Win 95/98.

c-code:
http://members.nbci.com/_XMCM/tune_smithy/dekany/srvrml.c

Run it in same directory as the decany_template.wrl

Ex. of use:
SRVRML 0.3 r0 r1 r2 r3 r4 r5 r6 r7 r8 r9

will make the xx=0.3 file. (replace the ri by whatever you
want for the vertices)

Will save it as
decany_0p3_r0_r1_r2_r3_r4_r5_r6_r7_r8_r9.wrl

where the r0, r1 etc will be whatever text you choose for the
vertices, with * replaced by s, / by o, and . by p (to make
them suitable for file names)

I've tried xx = 0.25 and at that setting you just see the yellow spheres,
through the other side, but not the diads - would be good one to use for
the model without diads.

Run without any args for more detail of options to use.

Look near head of file for list of all the midi clips to make.

Since you are planning to make .wav clips, you can do
a S&R of the template to replace .mid by .wav, which is safe to do, won't
affect anything else in the VRML.

More later - the 3)5 template still to come,

Robert

🔗Paul H. Erlich <PERLICH@ACADIAN-ASSET.COM>

11/14/2000 11:54:01 AM

Robert wrote,

>The cylinders and prisms are more tricky (assuming you want them to
>line up nicely and symmetrically).

>If one uses the most obvious kind of approach, you have to figure out the
>directions of the axes of the cylinders / prisms as 3D vectors
>for each one, and then having done that, need to figure out what 3D axis to
>rotate about, and by how much, to get to that direction from the VRML
default
>of vertically upwards

The vectors would just be the corresponding vectors in the dekany, wouldn't
they (couldn't they)?

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

11/14/2000 12:55:22 PM

Hi Paul

First, going back a bit:

>>file:///F|/www2/interactive_models_with_titles/Decany/decany_template~2.wrl

>nothing happens when I try to download this :(

Should have been
http://members.nbci.com/_XMCM/tune_smithy/decany/decany_template~2.wrl

and
http://members.nbci.com/_XMCM/tune_smithy/decany/decany_template_xx_0p3_filled_tetrahedra~2.wrl
Sorry.

However you'll soon be making your own ones (I hope) so not so relevant now.

>The cylinders and prisms are more tricky (assuming you want them to
>line up nicely and symmetrically).

>If one uses the most obvious kind of approach, you have to figure out the
>directions of the axes of the cylinders / prisms as 3D vectors
>for each one, and then having done that, need to figure out what 3D axis to
>rotate about, and by how much, to get to that direction from the VRML
default
>of vertically upwards

>The vectors would just be the corresponding vectors in the dekany, wouldn't
they (couldn't they)?

Yes, you are right, they would be for the triads, if the axes are normal to the faces

That will certainly introduce some simplification if I follow the obvious kind
of approach.

It would be really easy if one could define a cylinder in VRML by its endpoints, as
you can for an edge, but you can't do that. Instead you have to figure out what
3D rotation to use to rotate it to the desired orientation, starting with a cylinder
located with its axis vertical.

Which involves finding a suitable axis and angle of rotation. (or one could use
two rotations nested one within the other, which is another poss., easier
conceptually)

Doing it as a single rotation involves matrix multiplication, then solving the equation
R.v=v (i.e. eigenvector equation) for rotation matrix R and axis v.

I've done an app that does that - tedious to do by hand!

It is actually designed for another purpose, but the modification is easy and
could be useful to other VRML modellers.

Then I'd have to plug each of the start and end points into this app and read
out the desired rotation vectors for each one. I'd prefer to find a more
elegant method if I can.

Anyway, I'll give it some thought and see where it leads,...

Meanwhile, thing is to get it working at all.

Robert

🔗Paul H. Erlich <PERLICH@ACADIAN-ASSET.COM>

11/14/2000 12:51:58 PM

Robert, I've been thinking that the .wav files would be needed in
uncompressed form by the end user. This would make them occupy a
prohibitively large amount of memory. So I guess the MIDI approach is the
only reasonable one.

As for rotating the cylinder, I wrote a program in Matlab that finds the
simplest rotation that gets an object from one configuration to another, but
it uses Matlab's optimization toolbox . . . I guess I could just run this
for all the configurations in question . . . write me offline if you'd like
my help on this.

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

11/14/2000 1:43:44 PM

Hi Paul,

I've had to re-upload the
http://members.nbci.com/_XMCM/tune_smithy/dekany/dekany_with_diads_template.txt

While uncommenting the ROUTE and Sound lines for it, managed to delete them instead.

Sorry,

Rboert

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

11/15/2000 7:45:33 AM

Hi Paul,

Sometimes a good nights sleep can help:

.wrl:

http://www.robertwalker.f9.co.uk/dekany/dekany3_with_diads_faces_for_triads_tetrahedra_for_tetrads~3_0p25.wrl

and template text file

http://www.robertwalker.f9.co.uk/dekany/dekany3_with_diads_faces_for_triads_tetrahedra_for_tetrads~3.txt

Transparent tetrahedra.

c.f.
http://www.robertwalker.f9.co.uk/dekany/dekany3_with_diads_faces_for_triads_0p25.wrl

template
http://www.robertwalker.f9.co.uk/dekany/dekany3_with_diads_faces_for_triads.txt

(N.b. made the VRML a bit more efficient for that one, hopefully, by using USE to re-use the sphere nodes
- may poss. make a difference for some VRML browsers).

I think both are suitable.

On the .wav clips, something to bear in mind.

When I did the hexany, the 1.63 Mb version with all the diads was fine to browse off-line, but rather too much
of a download to browse on-line as you had to wait several minutes for all the .wav files to download before
you could use it (on 56K modem, - prob. okay for those with super-fast connections).

N.B. if you do make clips, another thing to bear in mind is that all the VRML models will use the same
audio files, so they don't depend at all on details of how the VRML is done.

Robert

🔗Paul H. Erlich <PERLICH@ACADIAN-ASSET.COM>

11/16/2000 5:56:09 PM

Robert Walker wrote,

>http://www.robertwalker.f9.co.uk/dekany/dekany3_with_diads_faces_for_triads
_tetrahedra_for_tetrads~3_0p25.wrl

Oh -- do the clickable objects _have_ to be spheres? In that case, attaching
little tetrahedra to them clutters this too much, I think. I was thinking
that you'd have just a little tiny opaque tetrahedron _instead of_ the
sphere . . .

>http://www.robertwalker.f9.co.uk/dekany/dekany3_with_diads_faces_for_triads
_0p25.wrl

. . . but if it has to be a sphere, I guess I'd prefer this one . . . how
about thin, unobtrusive lines linking each sphere to all the notes it
contains?

🔗Paul H. Erlich <PERLICH@ACADIAN-ASSET.COM>

11/16/2000 6:09:33 PM

I wrote,

>I was thinking that you'd have just a little tiny opaque tetrahedron
_instead of_ the sphere . . .

And they wouldn't be regular tetrahedra, either -- they'd have the same
shape and orientation as the corresponding tetrahedra in the dekany figure
itself.

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

11/16/2000 9:10:15 PM

Hi Paul,

I've just had an idea of a way of making the midi clips in FTS 1.09 as it is.

VERY Heath Robinson.

I have a way of making a degenerate fractal tune consisting of a single chord,
with particular setting of the various parameters.

Then idea is to make file consisting of all the file names at the head of the
VRML in the 3s7_5s7_3s5.mid etc format. (i.e. just uncomment, and cut and paste
from the VRML into a new file).

Now go through the file and read the file names

Truncate the file name at the ., replace the s by * everywhere, and
tokenise it using _ as a separator.
So that one becomes
3*7 5*7 3*5
Now put those through my expression parser, divide by suitable multiples of 2, and
so make the notes.

Then save it as a MIDI file with the original file name using my option to save a
fractal tune in MIDI format.

May sound complicated, but the way it is set up, will prob. be really easy.

I'll give it a try tomorrow,

Robert

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

11/17/2000 10:47:38 PM

Hi Joseph

>This is incredible!

>I'm amazed that you have been able to get this all working so quickly!

Magic :-)

Two hours of programming, some cut and paste, type the
incantation #mmc (=make midi chords) into the Sustain box, some whirring of
the disk drive, and there they all were.

I too was a bit astonished that it worked out so easily,

Robert