Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/lamont/test/implicit-surface/main_nogl.c
ViewVC logotype

View of /branches/lamont/test/implicit-surface/main_nogl.c

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2229 - (download) (as text) (annotate)
Fri Mar 1 20:01:56 2013 UTC (7 years, 4 months ago) by lamonts
File size: 809 byte(s)
updated the unit-circle example to print the angle
#include <math.h> 
#include <stdlib.h>
#include <stdio.h>
#include "unit-circle.h"

#define N 100 
#define STEP_SIZE 1

void GetData (CIRCLE_World_t *wrld, Nrrd *nData)
  // get snapshot of state
    if (CIRCLE_Snapshot_outPos(wrld, nData)) {
      // error
        fprintf(stderr, "Error getting nrrd data\n");
int main(int argc, char** argv)

    // initialize the Diderot program
    CIRCLE_World_t * wrld; 
    Nrrd *nData; 
    wrld = CIRCLE_Init();
    nData = nrrdNew();
    CIRCLE_Initially (wrld);
    int NumSteps = 0; 

    while (CIRCLE_NumActive(wrld) > 0) {
        // step the computation
        CIRCLE_Run(wrld, STEP_SIZE);

        // get and render the state
        GetData (wrld, nData);

    return 0;

ViewVC Help
Powered by ViewVC 1.0.0