Accueil > > > SIMULATION ALTERNATEUR TRIPHASÉ
SIMULATION ALTERNATEUR TRIPHASÉ
Information sur la source
Description
Ceci est un simulateur d'alternateur triphasé qui indique les etats des trois phases en fonction de la position du rotor. Je appliquer toute se que vous m'avez dit et sa marche beaucoup mieux je vous en remerci. Mais j'aimerai savoir si quelqu'1 sait coment tracer les sinusoides en meme temps que le rotor tourne.Et j'ai aussi un probleme avec le zero qui n'apparait pas.J'ai un probleme avec mes courbes il y en a qu'une seule qui marche.
Source
- onClipEvent (load) {
- _root.pixel1.visible = false;
- _root.vitesse = 0.1;
- _root.nbpixel1 = 0;
- _root.nbpixel2 = 0;
- _root.nbpixel3 = 0;
- _root.alpha = 0;
- _root.x1 = 0;
- _root.y1 = 0;
- }
- onClipEvent (keyDown) {
- if (Key.isDown(82)) {
- gotoAndPlay(1);
- }
- if (Key.isDown(107)) {
- _root.vitesse += 0.1;
- } else if (Key.isDown(109)) {
- _root.vitesse -= 0.1;
- }
- }
- onClipEvent (enterFrame) {
- _root.alpha += 1;
- if (_root.alpha == 60) {
- _root.x1 += 1;
- _root.nbpixel1 += 1;
- _root.nbpixel2 += 1;
- _root.nbpixel3 += 1;
- _root.alpha = 0;
- _root.y1 = (Math.round(418+(80*(Math.sin(((2*Math.PI)/(360/(_rotation*60)))*_root.x1+(Math.PI/2))))));
- _root.y2 = (Math.round(418+(80*(Math.sin(((2*Math.PI)/(360/(_rotation*60)))*_root.x1+(Math.PI/2)+(2*Math.PI/3))))));
- _root.y3 = (Math.round(418+(80*(Math.sin(((2*Math.PI)/(360/(_rotation*60)))*_root.x1+(Math.PI/2)+(-2*Math.PI/3))))));
- duplicateMovieClip(_root.pixel1, "pixel1"+_root.nbpixel1, _root.nbpixel1);
- _root["pixel1"+_root.nbpixel1]._visible = true;
- setProperty(_root["pixel1"+_root.nbpixel1], _x, (473+_root.x1));
- setProperty(_root["pixel1"+_root.nbpixel1], _y, _root.y1);
- duplicateMovieClip(_root.pixel2, "pixel2"+_root.nbpixel2, _root.nbpixel2);
- _root["pixel2"+_root.nbpixel2]._visible = true;
- setProperty(_root["pixel2"+_root.nbpixel2], _x, (473+_root.x1));
- setProperty(_root["pixel2"+_root.nbpixel2], _y, _root.y2);
- duplicateMovieClip(_root.pixel3, "pixel3"+_root.nbpixel3, _root.nbpixel3);
- _root["pixel3"+_root.nbpixel3]._visible = true;
- setProperty(_root["pixel3"+_root.nbpixel3], _x, (473+_root.x1));
- setProperty(_root["pixel3"+_root.nbpixel3], _y, _root.y3);
- }
- if (_root.x1 == 327) {
- _root.x1 = 0;
- function killerClip() {
- _root.i = 300;
- for (k=0; k<i; k++) {
- removeMovieClip(_root["pixel1"+k]);
- removeMovieClip(_root["pixel2"+k]);
- removeMovieClip(_root["pixel3"+k]);
- }
- }
- }
- _root.vitesse2 = (((60*_root.vitesse)*60)/360);
- this._rotation += _root.vitesse;
- _root.phase10._visible = _rotation<-90 or _rotation>90;
- _root.phase11._visible = _rotation>-90 and _rotation<90;
- _root.phase13._visible = _rotation == -90 or _rotation == 90;
- _root.phase20._visible = _rotation<30 and _rotation>-150;
- _root.phase21._visible = _rotation>30 or _rotation<-150;
- _root.phase23._visible = _rotation == 30 or _rotation == -150;
- _root.phase30._visible = _rotation<-30 or _rotation>150;
- _root.phase31._visible = _rotation>-30 and _rotation<150;
- _root.phase33._visible = _rotation == -30 or _rotation == 150;
- }
onClipEvent (load) {
_root.pixel1.visible = false;
_root.vitesse = 0.1;
_root.nbpixel1 = 0;
_root.nbpixel2 = 0;
_root.nbpixel3 = 0;
_root.alpha = 0;
_root.x1 = 0;
_root.y1 = 0;
}
onClipEvent (keyDown) {
if (Key.isDown(82)) {
gotoAndPlay(1);
}
if (Key.isDown(107)) {
_root.vitesse += 0.1;
} else if (Key.isDown(109)) {
_root.vitesse -= 0.1;
}
}
onClipEvent (enterFrame) {
_root.alpha += 1;
if (_root.alpha == 60) {
_root.x1 += 1;
_root.nbpixel1 += 1;
_root.nbpixel2 += 1;
_root.nbpixel3 += 1;
_root.alpha = 0;
_root.y1 = (Math.round(418+(80*(Math.sin(((2*Math.PI)/(360/(_rotation*60)))*_root.x1+(Math.PI/2))))));
_root.y2 = (Math.round(418+(80*(Math.sin(((2*Math.PI)/(360/(_rotation*60)))*_root.x1+(Math.PI/2)+(2*Math.PI/3))))));
_root.y3 = (Math.round(418+(80*(Math.sin(((2*Math.PI)/(360/(_rotation*60)))*_root.x1+(Math.PI/2)+(-2*Math.PI/3))))));
duplicateMovieClip(_root.pixel1, "pixel1"+_root.nbpixel1, _root.nbpixel1);
_root["pixel1"+_root.nbpixel1]._visible = true;
setProperty(_root["pixel1"+_root.nbpixel1], _x, (473+_root.x1));
setProperty(_root["pixel1"+_root.nbpixel1], _y, _root.y1);
duplicateMovieClip(_root.pixel2, "pixel2"+_root.nbpixel2, _root.nbpixel2);
_root["pixel2"+_root.nbpixel2]._visible = true;
setProperty(_root["pixel2"+_root.nbpixel2], _x, (473+_root.x1));
setProperty(_root["pixel2"+_root.nbpixel2], _y, _root.y2);
duplicateMovieClip(_root.pixel3, "pixel3"+_root.nbpixel3, _root.nbpixel3);
_root["pixel3"+_root.nbpixel3]._visible = true;
setProperty(_root["pixel3"+_root.nbpixel3], _x, (473+_root.x1));
setProperty(_root["pixel3"+_root.nbpixel3], _y, _root.y3);
}
if (_root.x1 == 327) {
_root.x1 = 0;
function killerClip() {
_root.i = 300;
for (k=0; k<i; k++) {
removeMovieClip(_root["pixel1"+k]);
removeMovieClip(_root["pixel2"+k]);
removeMovieClip(_root["pixel3"+k]);
}
}
}
_root.vitesse2 = (((60*_root.vitesse)*60)/360);
this._rotation += _root.vitesse;
_root.phase10._visible = _rotation<-90 or _rotation>90;
_root.phase11._visible = _rotation>-90 and _rotation<90;
_root.phase13._visible = _rotation == -90 or _rotation == 90;
_root.phase20._visible = _rotation<30 and _rotation>-150;
_root.phase21._visible = _rotation>30 or _rotation<-150;
_root.phase23._visible = _rotation == 30 or _rotation == -150;
_root.phase30._visible = _rotation<-30 or _rotation>150;
_root.phase31._visible = _rotation>-30 and _rotation<150;
_root.phase33._visible = _rotation == -30 or _rotation == 150;
}
Historique
- 21 mai 2005 21:18:49 :
- correction des problemes précédents grace a votre aide
- 22 mai 2005 21:04:52 :
- ajout de la fonction duplkicate movieclip mais ne semble pas fonctionner
- 26 mai 2005 20:35:22 :
- ajout du tracage des courbes mais il y en a qu'une qui apparait
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
UNE JOLIE-HORLOGE ET PAS QU'UN PEU !UNE JOLIE-HORLOGE ET PAS QU'UN PEU ! par neodante
Pour les possesseurs d'iPhone, ça y est Bijin Tokei - qui se traduit littéralement en Français par " Jolie Horloge " - est arrivé et GRATUITEMENT s'il vous plaît ! Après la version Tokyo, Hokkaido, night club, racing, Gal, "pour les mademoiselles'", . voi...
Cliquez pour lire la suite de l'article par neodante TECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICESTECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICES par ROMELARD Fabrice
Animé par: Gaetan Bouveret et Julien Chomarat Business Connectivity Services (BCS) est dans SharePoint 2010 la version 2 de Business Data Catalog (BDC dans SharePoint 2007). Il s'agit de la solution permettant de visualiser des données provenan...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE[DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE par orion
Comme de nombreux geek, je suis un grand amateur de série TV et je rate régulièrement des épisodes de mes séries préférés. Une solution s'offre à vous avec ce merveilleux site : Tv Gorge - www.tvgorge.com Moteur de recherche à l'appui, vous pouvez ...
Cliquez pour lire la suite de l'article par orion TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Vincent Bellet et Baptiste Giraudier La BI dans SharePoint 2010, Les nouveaux services d'application dans SP2010 et SQL Server Reporting services 2008 R2. La BI dans SharePoint est généralisée pour tous afin de permettre à tous les coll...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|