WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-12-2009, 02:21 AM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Norm of a vector

Hi,
how can I calculate the norm of a vector or how can I extract a root in pyhton?

Sorry, but I can't find any information about this..

Thanks a lot.
Reply With Quote
  #2  
Old 05-12-2009, 10:03 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the viz.Vector class to get the length of any vector. Here is some code:
Code:
v = viz.Vector(0,3,0)
print v.length()
v.normalize()
print v.length()
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prioritize Director thread aznan Vizard 9 05-14-2008 10:57 AM


All times are GMT -7. The time now is 12:26 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC