HP Forums
Some graphics (Work in progress) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: Some graphics (Work in progress) (/thread-257.html)



Some graphics (Work in progress) - ArielPalazzesi - 12-27-2013 08:18 PM

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]


RE: Some graphics (Work in progress) - ArielPalazzesi - 12-27-2013 09:09 PM

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;