Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Display any vector anywhere
 

Fenrir




quote this post edit post

IP Loged report this post

Old Post  05-20-05 - 12:27 AM  
I want to display.vectors
First i need to calculate position, rotation of each element

In this exemple I consider a vector V with origin O
;(http://perso.wanadoo.fr/promethee60/3D/vect3.wrl)
Ox=Oy=Oz=0 V(x=30,y=30,z=30)

Vector composed from
sphere at origin
cylinder for vector body
cone for extrimity

I've tried to calculate rotation and translation but I need help

In this particular case I solve with lot of test the problem but the Problem
is that i want to display lot of vector particulary for magnetic and
electrical field, mecanichal force

.
Someone can tell me how to position element.

For sphere at origin i think coord of origin is coord of translation
sphere transform.

For cylinder body and cone extrimity?


#---------------------------------------------------------------
# Un vecteur
# Vecteur x=30 y=30 z=30
# A B C D E F G H point du pave ou le vecteur est inscrit
# display Cube VECT_CUBE wich contain vector

DEF VECT_CUBE Shape {
appearance Appearance {
material Material { diffuseColor 1 1 1}
}
geometry IndexedLineSet {
coord Coordinate {
# A B C D E F G H <=> 0 1 2 3 4 5 6 7
point [ 30 0 0, 30 0 30, 0 0 30, 0 0 0, 30 30 0,30 30 30,0
30 30,0 30 0 ]
}
coordIndex [
0,1,5,4,0,-1,2,6,7,3,2,-1,0,3,-1,1,2,-1,5,6,-1,4,7,-1]
}
}
#----------------     SPHERE AT ORIGIN           -----------------------
DEF ORIGIN Shape{
geometry Sphere {radius 2}
}
#----------------     CONE AT END           -----------------------
DEF VECT_END Transform {      translation 31 32 31     rotation 1 0 -1 
0.942
children [
Shape{
geometry Cone {bottomRadius 2 height 5 }
}
]
}
#----------------     VECTOR BODY           -----------------------
DEF VECT Transform { center  0.5 -26.5 0.5 translation 0.5 26.5 0.5
rotation 1 0 -1 0.942
children [
Shape{
#     racine, sqrt  (30² + 30² +30²) =>
geometry Cylinder {radius 1 height 52 }
}
]
}

http://perso.wanadoo.fr/promethee60/3D/vect3.wrl





Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 02:14 PM. Post New Thread   
  Previous Last Thread   Next Thread next
VRML archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top