This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<GL/glut.h> | |
void display() { | |
glClear(GL_COLOR_BUFFER_BIT); | |
glColor3f(1.0, 0.0, 0.0); | |
glBegin(GL_POINTS); | |
glVertex2f(10.0, 10.0); | |
glVertex2f(150.0, 80.0); | |
glVertex2f(100.0, 20.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create a simulator object | |
set ns [new Simulator] | |
#Define different colors for data flows (for NAM) | |
$ns color 1 Blue | |
$ns color 2 Red | |
#Open the NAM trace file | |
set nf [open out.nam w] | |
$ns namtrace-all $nf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("hello") |