WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-30-2009, 03:54 AM
jaclyn.bill jaclyn.bill is offline
Member
 
Join Date: Oct 2007
Posts: 42
vertex list

Hi,

I'm trying to get vizard to draw a set of lines on a certain length along a ground plane which follow a curving path (essentially creating basic road markings).

I really want the lines to follow a set of vertex points set by

x = np.linspace(-np.pi, np.pi, length)
y = x, np.sin(x)
z = some constant

However, I can't seem to get these functions to work in vizard when I create an array:

Code:
roadarray = 0.0*np.zeros(201,3)

roadarray[0] = x
roadarray[1] = y
roadarray[2] = z
		

viz.startlayer(viz.LINE_STRIP)
viz.linewidth(4)
viz.vertexcolor(0, 0.6, 0)
viz.vertex(roadarray[0],roadarray[1],roadarray[2])
lines = viz.endlayer()
Vizard is having problems reading "roadarray = 0.0*np.zeros(201,3)" (saying "TypeError: data type not understood") even though I can get this to create an array in python.

I'm sure this is a small error on my part, but if any one can point me in the right direction I would be grateful.

Many thanks.

J
Reply With Quote
 


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
Vertex shader performance problem Joran Vizard 2 11-17-2008 01:29 AM
onkeydown list of values Cheff Vizard 2 07-02-2008 02:00 AM
How to get the position of a vertex Jerry Vizard 1 10-04-2006 11:28 AM
get vertex with on the fly object enkeli Vizard 9 05-25-2006 08:27 PM
GLSL / vertex shaders oodini Vizard 1 11-23-2005 10:24 AM


All times are GMT -7. The time now is 12:48 PM.


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