|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T c ┃
Length: 949 (0x3b5) Types: TextFile Names: »c_curve«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─ ⟦this⟧ »EUUGD11/euug-87hel/sec1/gprolog/demo/c_curve«
/* C curve */ init :- #def(basic,BASIC), #def(noinput,NOINPUT), #def(twod,TWOD), #initialize_core(BASIC,NOINPUT,TWOD), #def(false,FALSE), #initialize_view_surface(pixwindd,FALSE), #select_view_surface(pixwindd), #set_viewport_2(0.125,0.875,0.125,0.75), #set_window(-80.0,80.0,-50.0,80.0). demo :- #create_temporary_segment, #move_abs_2(10.0,10.0), c_curve(50.0,0.4), #close_temporary_segment, label("C-Curve"). label(Label) :- #create_temporary_segment, #move_abs_2(20.0,-20.0), #text(Label), #close_temporary_segment. label(X) :- fail. c_curve(Length,Angle) :- Length < 3.0, !, plotline(Length,Angle). c_curve(Length,Angle) :- #def(pi,PI), L is Length / (PI / 2), A1 is Angle + PI / 4.0, A2 is Angle - PI / 4.0, c_curve(L,A1), c_curve(L,A2). plotline(Length,Angle) :- X is Length * cos(Angle), Y is Length * sin(Angle), #line_rel_2(X,Y). done :- #deselect_view_surface(pixwindd), #terminate_core.