Post Reply 
Some graphics (Work in progress)
12-27-2013, 08:18 PM
Post: #1
Some graphics (Work in progress)
Hello!

As part of my learning in programming HP Prime, I'm writing some programs that draw simple or complex graphics.

I have several, I'll be publishing in the next few hours. This is the first one:


Code:
EXPORT grafico1()
BEGIN
//Valores iniciales
local ZZ,XX,YY, angulo;

//Manejo el tema del formato de los angulos
angulo := HAngle;
HAngle := 0; //Modo = grados

DIMGROB_P(G1,320,240);
BLIT_P(G0,G1);

FOR ZZ FROM 0 TO 10 STEP .15 DO
  FOR XX FROM 0 TO 10 STEP .08 DO
    YY := -15*cos(3*((XX-5)*(XX−5)+(ZZ−5)*(ZZ−5))^0.5)/2+50;
    PIXON_P(XX*25+20+ZZ*3,YY+ZZ*12,#0+IP(ZZ*5000));
  END;
END;

FREEZE;

HAngle := angulo;
END;

[Image: Captura+de+pantalla+de+2013-12-27+17%253A09%253A43.png][/code]
Find all posts by this user
Quote this message in a reply
12-27-2013, 09:09 PM (This post was last modified: 12-27-2013 09:10 PM by ArielPalazzesi.)
Post: #2
RE: Some graphics (Work in progress)
Another one:

[Image: Captura+de+pantalla+de+2013-12-27+18%253A03%253A52.png]

Code:
EXPORT grafico2()
BEGIN
//Valores iniciales
local AA,BB,CC,DD,EE,FF, angulo;

//Manejo el tema del formato de los angulos
angulo := HAngle;
HAngle := 0; //Modo = grados

DIMGROB_P(G1,320,240);
BLIT_P(G0,G1);

FOR AA FROM 0 TO 400 DO
  BB := AA*atan(1)/90*360/255*4;
  CC := CC+255/191;
  DD := CC*atan(1)/90*360/255*3;
  EE := sin(BB)*120+120;
  FF := cos(DD)*160+160;
  LINE_P(CC,EE,FF,AA,#02FFFF+IP(AA*350));
  WAIT(0.05);
END;

FREEZE;

HAngle := angulo;
END;
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)