Page MenuHomec4science

plot_triangles.py
No OneTemporary

File Metadata

Created
Sun, Oct 20, 10:10

plot_triangles.py

#!/usr/bin/env python
from numpy import *
from pNbody import io
import sys
import libtessel as libt
file = sys.argv[1]
triangles,num = libt.read_triangles(file)
######################################################################
#
# PLOT
#
######################################################################
#sys.exit()
import Ptools as pt
import plot
########################
# draw a box
plot.draw_box(x=array([0,1,1,0]),y=array([0,0,1,1]))
########################
# draw the triangles
for Triangle in triangles:
P1 = Triangle[0]
P2 = Triangle[1]
P3 = Triangle[2]
plot.draw_triangle(P1,P2,P3,c='r')
pt.axis([-0.1,1.1,-0.1,1.1])
pt.show()

Event Timeline