HPPCAS_PL -> Xcas_PL

Utilisation de Xcas

Modérateur : xcasadmin

compsystems
Messages : 554
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

HPPCAS_PL -> Xcas_PL

Message par compsystems » mer. nov. 15, 2017 11:34 am

Hello

Code : Tout sélectionner

#cas
 def fractale(X,Y,N) :
 local x,y,z,c,j,t
 for x in range(X):
  for y in range(Y):
   z=0
   c=2.7x/X-2.1-i*(1.87y/Y-.935)
   j=-1
   while((j=j+1)
   z=z*z+c
   t=255j/N
   PIXON_P(x,y,RGB(IP(t),IP(3t/4),IP(t/4)))
 FREEZE
 WAIT(0)
#end 

What is the equivalent code in Xcas language?

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: HPPCAS_PL -> Xcas_PL

Message par parisse » mer. nov. 15, 2017 11:58 am

Remove #cas and #end, enter it in Xcas, and look at the translation. Note that RGB, PIXON_P, FREEZE and WAIT are HP only instructions, they will not work in Xcas. You can call pixon(i,j,color) in Xcas.

compsystems
Messages : 554
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: HPPCAS_PL -> Xcas_PL

Message par compsystems » mer. nov. 15, 2017 7:39 pm

I did not find the documentation of your website, about pixon

Répondre