This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > February 2005 > VRML, Trajectory on Field parsed from XML





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author VRML, Trajectory on Field parsed from XML
Fenrir

2005-02-03, 4:24 am

Hi,

I want to display mobile trajectory in 3D,
the mobile trajectory will change whith wind, humiduty rate, temperature,
earth attraction and so on.

First I want to display the refences'axes (X,Y,Z) and a line from calculated
points.
the mathematical represation is a parametric curve c=f(t)

There is node Line in VRML ?
How to make the line?
With 100 points resolution points[0] {X,Y;Z} ->points[99].....

Next I 'want to generate field from XML data.
do I use elevation grid ?

Last but not least, there is someone who know good ressources upon :
3D geomatics and GIS
3D, Vrml, X3D, scripting
wings tutorials (sourceforge.net) and other Open Source projects













Cybercentre

2005-02-03, 6:25 pm

Salut,

Si c'est pour tracer des lignes, tu as le noeud IndexedLineSet, par exemple
:

#VRML V2.0 utf8

Shape {
appearance Appearance {material Material {diffuseColor 0 1 1}}
geometry DEF MyGeo IndexedLineSet {
coord Coordinate {
# d'abord, les coordonnées des différents points :
point [1.23 5.67 8.90, 7.41 8.52 9.63, 9.87 6.54 3.21]
}
coordIndex [0 1 2] # ensuite le numéro des points, si c'est une
ligne ça sera simple : 0 1 2 3 4 ....
}
}

# Et puis après pour utiliser ça dans un noeud Script (dans mon exemple ça
met des coordonnées au hasard ...) :

Script {
field SFNode MyGeoUSE MyGeo
url "vrmlscript:
function initialize() {
pts = new MFVec3f(); # on crée un tableau pour les coordonnées
index = new MFInt32(); # un autre pour les numéros
for(i=0; i<100; i++) {
pts[i] = new SFVec3f(Math.random(), Math.random(),
Math.random());
index[i] = i;
}
MyGeo.coord.point = pts;
MyGeo.coordIndex = index;
}
"
}

L'ElevationGrid c'est pas génial pour tracer une courbe ... par contre pour
les surfaces, là c'est plus utile ;-)
Côté XML j'y connais rien, je peux pas t'aider.

Amicalement,
O.L.



"Fenrir" <bois.a@wanadoo.fr> a écrit dans le message de news:
4201ce17$0$6620$8fcfb975@news.wanadoo.fr...
> Hi,
>
> I want to display mobile trajectory in 3D,
> the mobile trajectory will change whith wind, humiduty rate, temperature,
> earth attraction and so on.
>
> First I want to display the refences'axes (X,Y,Z) and a line from
> calculated points.
> the mathematical represation is a parametric curve c=f(t)
>
> There is node Line in VRML ?
> How to make the line?
> With 100 points resolution points[0] {X,Y;Z} ->points[99].....
>
> Next I 'want to generate field from XML data.
> do I use elevation grid ?
>
> Last but not least, there is someone who know good ressources upon :
> 3D geomatics and GIS
> 3D, Vrml, X3D, scripting
> wings tutorials (sourceforge.net) and other Open Source projects
>
>
>
>
>
>
>
>
>
>
>
>
>



Fenrir

2005-02-04, 4:16 am

Je te remerice pour tes explications.
Une derniere chose j'arrive a user de script pour animer le VRML mais
contrairement à SVG j'ai des difficultés à communiquer avec le document
HTML.

En SVG je peux d'un click sur une forme mettre à jour un bloc DIV, par
exemple afficher les coordonnées d'un point, comment faire en VRML avec IE6
et plugin BS contact VRML? Dois je utiliser l'applet blaxxrun?

Cordialement Arnaud


Joerg Scheurich aka MUFTI

2005-02-04, 6:19 pm

> Last but not least, there is someone who know good ressources upon :
> ... Vrml ...
> ... and other Open Source projects


http://www.csv.ica.uni-stuttgart.de...white_dune.html
http://www.artofillusion.org/
http://www.blender.org/
http://www.crc.ca/FreeWRL/
http://www.web3d.org/TaskGroups/source/xj3d.html
http://www.openvrml.org/

http://sharp3d.sourceforge.net/

so long
MUFTI
--
(Press Retry to debug the application - JIT must be enabled)
Abbrechen Wiederholen Ignorieren
aus einer M$Windows "assert" Fehlermeldung
O.L.

2005-02-05, 6:22 pm

Fenrir avait écrit le 04/02/2005 :
> Je te remerice pour tes explications.
> Une derniere chose j'arrive a user de script pour animer le VRML mais
> contrairement à SVG j'ai des difficultés à communiquer avec le document
> HTML.
>
> En SVG je peux d'un click sur une forme mettre à jour un bloc DIV, par
> exemple afficher les coordonnées d'un point, comment faire en VRML avec IE6
> et plugin BS contact VRML? Dois je utiliser l'applet blaxxrun?
>
> Cordialement Arnaud


Salut,

Dans le sens HTML->VRML, la communication passe à tout les coups :
<embed id=vrml src="world.wrl">
<script>
data = vrml.getNodeEventOut('MyNode', 'myEventOut');
vrml.setNodeEventIn('MyNode', 'myEventIn', 'value');
</script>

Par contre, dans le sens VRML->HTML, c'est moins bien. A la demande
d'un Script{}, le browser charge une nouvelle url, qui peut être une
commande JavaScript. Le problème, c'est que tes demandes peuvent ne pas
toutes être exécutées, les plus récentes pouvant écraser les premières,
le changement d'url et l'exécution du code JS qu'elle contient n'étant
pas instantané.

Script {
url "vrmlscript:
function initialize() {
Browser.loadURL(new MFString('java script:maFonction();'), new
MFString(''));
Browser.loadURL(new MFString('java script:uneAutre();'), new
MFString(''));
}
"
}

Dans ce cas par exemple, uneAutre() sera exécutée mais pas
maFonction(), qui a été "écrasée".
Attention : la fonction appellée ne doit rien retourner !

@+
O.L.

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews