[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Elaps problem
Hello.
I tried to create an eps from the example inthe epix tutorial.
The semicircle in section 2.1 (I have attached the code)
I give the command
elaps semicirc.cpp
and I get
Error: /invalidaccess in --.setdevice--
Operand stack:
--nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3
%oparray_pop 1 3 %oparray_pop .runexec2 --nostringval--
--nostringval-- --nostringval-- 2 %stopped_push --nostringval--
--nostringval-- --nostringval-- 1 4 %oparray_pop --nostringval--
--nostringval-- --nostringval--
Dictionary stack:
--dict:1040/1476(ro)(G)-- --dict:0/20(G)-- --dict:68/200(L)--
--dict:19/30(L)--
Current allocation mode is local
Current file position is 8771
GNU Ghostscript 6.53: Unrecoverable error, exit code 1
sed: -e expression #2, char 15: Extra characters after command
So... where to start finding the problem?
Best wishes
Gunnar.
/*semicirc.cpp -- A rectangle inscribed in a semi-circle*/
#include "epix.h"
using namespace ePiX;
double width=0.6;
double posn=0.5, y_posn=sqrt(1-posn*posn);
main(){
unitlength("2cm");
bounding_box(P(-1,0),P(1,1));
picture(P(2.5,1.25));
offset(P(0,0.25));
begin();
line(P(x_min,0),P(x_max,0));
line(P(0,y_min),P(0,y_max));
ellipse_top(P(0,0),P(1,1));
bold();
rect(P(-width,0),P(width,sqrt(1-width*width)));
label(P(posn,y_posn),P(2,4),"$y=\\sqrt{1-x^2}$");
h_axis_labels(P(x_min,0),P(x_max,0),x_size,P(-12,12));
end();
}