From @scapa.cs.ualberta.ca:arms@spedden.cs.UAlberta.CA Fri May 24 02:32:17 1991
Received:  from scapa.cs.ualberta.ca  by fish.cis.ufl.edu (5.61ufl/4.12)
	id AA12991; Fri, 24 May 91 02:32:08 -0400
Received: from spedden.cs.UAlberta.CA ([129.128.4.34]) by scapa.cs.ualberta.ca with SMTP id <174669>; Fri, 24 May 1991 00:32:00 -0600
Received: by spedden.cs.UAlberta.CA (/\=-/\ Smail3.1.18.1 #18.37)
	id <m0jgVfy-00000mC@spedden.cs.UAlberta.CA>; Fri, 24 May 91 00:31 MDT
Message-Id: <m0jgVfy-00000mC@spedden.cs.UAlberta.CA>
From: arms@cs.ualberta.ca (Bill Armstrong)
Subject: Re: a couple of questions
To: fishwick@fish.cis.ufl.edu (Paul Fishwick)
Date: 	Fri, 24 May 1991 00:30:59 -0600
In-Reply-To: <9105232149.AA12846@fish.cis.ufl.edu>; from "Paul Fishwick" at May 23, 91 3:49 pm
X-Mailer: ELM [version 2.3 PL11]
Status: R

Hi Paul,

Sorry you're having problems.  I don't think you'll need the
device.h header.  The graphics calls, all in graphix.c, should be
replaced by your machine's calls for lines etc.  It's very simple.
I'll send my core version below.  You should compile with pgraphix.c
to just print values first though.  That checks the solution.

Sorry, but I'm off to France until June 28.  Good luck.

Bill

Below is for a Sun.  Hope it's ok.
************


#include <stdio.h>

#include <usercore.h>

#include <math.h>

#include "dynavars.h"

int pixwindd();

struct vwsurf vwsurf = DEFAULT_VWSURF(pixwindd);


graphinit() {

int error;

error = initialize_core(BASIC,NOINPUT,THREED);
if( error )exit(0);
error = initialize_view_surface(&vwsurf,FALSE);
error |= select_view_surface(&vwsurf);
if( error )exit(1);

set_viewport_2(0.05,0.95,0.05,0.75);
set_window(-0.18,0.18,-.14,0.14);
set_output_clipping(FALSE);
set_window_clipping(FALSE);
set_view_reference_point(0.0,3.0,0.0);
set_view_plane_normal(0.0,-1.0,0.0);
set_view_up_3(0.0,0.0,-1.0);
set_view_plane_distance(0.5);
set_projection(PERSPECTIVE,0.0,0.0,0.0);
set_view_depth(1.0,500.0);

new_frame();
}

graphend() {

deselect_view_surface(&vwsurf);
terminate_core();
 
}

  
drawman()


{
int link,par;
double tempv[3];

create_temporary_segment();

  for (link = 2; link <=numlinks;link++){
  par = parent[link];

move_abs_3(pH[par][0],pH[par][1],pH[par][2]);

line_abs_3(pH[link][0],pH[link][1],pH[link][2]);
  }


  for(link = 1;link <= numlinks; link++){
  mxv(RI[link],c[link],tempv);
  sxv(2.0,tempv,tempv);
  vpv(pH[link],tempv,tempv);
move_abs_3(pH[link][0],pH[link][1],pH[link][2]);

line_abs_3(tempv[0],tempv[1],tempv[2]);
  }
close_temporary_segment();

}


   

