looking for simple 3d plotting program

2010-04-08 Thread Robert Huff

I have a project for which I need to produce a {gif, jpg, png}
of a 3d space, with labled axes, and plot a small number (25 ??) of
points within it, either with labels or as icons.
Two constraints:
Current code is written in C.  I know there are programs in C++
and Python ... and I'm sure they will make someone else very happy.
I know very little about data visualization in general, and
would prefer - for the moment - not to have to learn.
Anyone have suggestions?


Robert Huff

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


looking for simple 3d plotting program

2010-04-08 Thread Robert Huff

Robert Huff writes:

   I have a project for which I need to produce a {gif, jpg, png}
  of a 3d space, with labled axes, and plot a small number (25 ??) of
  points within it, either with labels or as icons.
   Two constraints:
   Current code is written in C.

I expressed myself badly.  What I should have said was:

It must be usable via C function calls.


Robert Huff

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: looking for simple 3d plotting program

2010-04-08 Thread Alexey Shuvaev
On Thu, Apr 08, 2010 at 11:05:15AM -0400, Robert Huff wrote:
 
 Robert Huff writes:
 
  I have a project for which I need to produce a {gif, jpg, png}
   of a 3d space, with labled axes, and plot a small number (25 ??) of
   points within it, either with labels or as icons.
  Two constraints:
  Current code is written in C.
 
   I expressed myself badly.  What I should have said was:
 
   It must be usable via C function calls.
 
Not the best and the most elegant way to achieve this, but...
you can try math/gnuplot. It can do 3d.
CC=gcc
CCFLAGS= -g -Wall 
LDFLAGS= -lm -lpthread

target= testgnuplot
objects= testgnuplot.o gnuplot.o

all: $(target)

$(target): $(objects) 
$(CC) $(LDFLAGS) $(objects) -o $@ 

%.o: %.c
$(CC) $(CCFLAGS) -c $ -o $@

clean:
rm -f $(objects)
rm -f $(target)
gnuplot.c implements a helper function that invokes gnuplot
to display the acquired data. 

You need to have the gnuplot package installed to take advantage
of this function.

You can reuse it in your program by adding the gnuplot.c and 
gnuplot.h files to your project and calling the function:

int sendDataToGnuplot(int handle, float x0, float dX,
  double *buffer, int nbOfPointsPerCh,
  int nbOfCh);

handle is the handle of the acquisition session returned by _PdAquireSubsystem.
x0 is the origin of the x axis
dX is the increment between each points on the x axis
buffer contains the acquired data
nbOfPointsPerCh contains the number of sampels acquired for each channel
nbOfCh contains the number of channels
  
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org