Autor Beitrag
syro
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Mi 29.09.04 20:17 
Hi Leute :) Hoffe ihr könnt mir helfen!

Habe ein Problem mit einzeigen einer Sinuskurve, brauch so ein Program für meine GFS in Physik, das Thema lautet "Zusammensetzung von Sinusschwingungen".. vielleicht kennt ja der ein oder andere das :)

so nun zu meinem Problem:

Ich möchte ein Koordinationsystem bauen und darein eine Sinuskurve der Funktion f(x)=sin(x)..

das woltle ich mit einer Schleife bewerkstelligen..

for(i=0; i<400; i++) {

y = sin(i);
}

ist natürlicher totaller Schwachsinn.. hat mir jemand eine Funktion die mir das ermöglicht??

Vielen Dank. mfg
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mi 29.09.04 20:20 
Hmmm... bin zwar erst C-Anfänger, aber ich bin mir sicher, dass du nicht einfach deinen Winkel in Grad übergeben kannst. Radiant würd ich mal sagen... zu allererst.

AXMD
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mi 29.09.04 20:33 
stimmt, siehe DegToRad und RadToDeg in der OH

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
doubleq
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Sa 02.10.04 11:49 
Also in Deinem konkreten Fall brauchst Du die Funktionen nicht - Du musst einfach dafür sorgen dass Deine Zählvariable von 0 bis 2pi läuft. Also Dein i durch 200 teilen und mit pi multiplizieren. Wenn Du das dann an die sin()-Funktion übergibst bekommst Du was Du willst.

Gruß DoubleQ
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Sa 02.10.04 12:04 
ah stimmt, war c. cod ehab ich mir gar net angeguckt.
aber warum sollte ein Delphi-Forum bei einem C-Programm helfen?
Gibt doch genug C-Foren.

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
syro Threadstarter
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Sa 02.10.04 16:13 
Hey danke für die Antworten, ich habe es mit PHP realisiert, doch in Delphi ist es genau das gleiche.. die Technik, wenn man sie raushat, ist einfach!

Falls jemand den Quellcode in PHP haben möchte, bitte per eMail kontaktieren.

mfg Dennis Sch.