public ParticulaDibujable(Particula p) { this.particula=p; start=new Point3d(0,0,0); color=new float[4]; GeneradorAleatorioUniforme gau=new GeneradorAleatorioUniforme(); color[0]=(float)gau.Genera(0.1,1); color[1]=(float)gau.Genera(0.1,1); color[2]=(float)gau.Genera(0.1,1); color[3]=(float)gau.Genera(0.5,1); }
public void PonerColorAleatorioEnParticulas() { this.aleatpart=true; if(particDib!=null && particDib[0]!=null) { GeneradorAleatorioUniforme gau=new GeneradorAleatorioUniforme(); float transparencia=(float)gau.Genera(0.5,1); for(int i=0;i<particDib.Length;i++) { particDib[i].Red=(float)gau.Genera(0.1,1); particDib[i].Green=(float)gau.Genera(0.1,1); particDib[i].Blue=(float)gau.Genera(0.1,1); particDib[i].Transparencia=transparencia; } } }