grafica funzione retta

descrizione grafica vari tipi di rette
assegnazione valori con ciclo for-next
scrivere equazione della retta passante per due punti
equazione esplicita della retta
grafica con derive
esercitazione con visual basic su powerpoint

Private Sub CommandButton1_Click()
Rem retta1
ListBox1.AddItem ("ax + by + c = 0 ")
ListBox1.AddItem ("retta non parallela agli assi ")
ListBox1.AddItem (" (x-x1)/(x2-x1) = (y-y1)/(y2-y1) ")
ListBox1.AddItem ("P1(3,5) , P2(2,7): ")
ListBox1.AddItem ("scrivere equazionedella retta passante per due punti ")
x1 = 3
x2 = 2
y1 = 5
y2 = 7
ListBox1.AddItem ("equazione da risolvere con punti (3,5),(2,7)")
ListBox1.AddItem ("(x-3)/(2-3)=(y-5)/(7-5)")
ListBox1.AddItem ("(x-3)/-1 = (y-5)/2 ")
ListBox1.AddItem (" 2 * x + y - 11=0")
ListBox1.AddItem ("2x+y - 11 =0 ")
ListBox1.AddItem ("calcolo valori per x,y ")
For x = 0 To 10
y = 11 - 2 * x
ListBox1.AddItem (x & " " & y)
Next x
ListBox1.AddItem ("traccio retta che passa per punti (3,5), (2,7)")
retta1.Visible = True
End Sub

Private Sub CommandButton10_Click()
Rem bisettrice 2-4 quadrante
ListBox1.AddItem ("y = -x ")
For x = -3 To 3
y = x
ListBox1.AddItem (x & " " & y)
Next x
ListBox1.AddItem ("grafico bisettice ")
retta10.Visible = True
End Sub

Private Sub CommandButton11_Click()
ListBox1.Clear
End Sub

Private Sub CommandButton12_Click()
retta1.Visible = False
retta2.Visible = False
retta3.Visible = False
retta4.Visible = False
retta5.Visible = False
retta6.Visible = False
retta7.Visible = False
retta8.Visible = False
retta9.Visible = False
retta10.Visible = False
End Sub

Private Sub CommandButton2_Click()
Rem retta parallela all'asse x
ListBox1.AddItem ("y-c = 0")
c = -3 / 7
ListBox1.AddItem ("intersezione c= -3/7 ")
ListBox1.AddItem ("y + 3/7 = 0 ....7y+3=0 ")
ListBox1.AddItem ("creazione grafico")
retta2.Visible = True
ListBox1.AddItem ("retta parallela all'asse x ")
End Sub

Private Sub CommandButton3_Click()
Rem retta parallela all'asse y
ListBox1.AddItem ("x-c = 0")
c = 2 / 5
ListBox1.AddItem ("intersezione c= 2/5 ")
ListBox1.AddItem ("x - 2/5 = 0 ....5x-2=0 ")
ListBox1.AddItem ("creazione grafico")
retta3.Visible = True
ListBox1.AddItem ("retta parallela all'asse y ")
End Sub

Private Sub CommandButton4_Click()
Rem retta parallela a x e passante per P=-c/b
ListBox1.AddItem ("by + c = 0 ..... 2y+3 = 0")
b = 2
c = 3
y = -c / b
ListBox1.AddItem ("intersezione = -3/2 ")
ListBox1.AddItem ("grafico con derive")
retta4.Visible = True
ListBox1.AddItem ("retta parallela all'asse x passante per -c/b")
End Sub

Private Sub CommandButton5_Click()
Rem retta parallela a y e passante per P=-c/a
ListBox1.AddItem ("ax + c = 0 ..... 2x+3 = 0")
a = 2
c = 3
x = -c / a
ListBox1.AddItem ("intersezione = -3/2 ")
ListBox1.AddItem ("grafico con derive")
retta5.Visible = True
ListBox1.AddItem ("retta parallela all'asse y passante per -c/a ")
End Sub

Private Sub CommandButton6_Click()
Rem tracciare retta di nota equazione
ListBox1.AddItem ("equazione retta nota:3x-2y+1 =0")
ListBox1.AddItem ("individuare coordinate due punti con ciclo for-next")
ListBox1.AddItem ("tracciare grafico che passa per due punti, o con derive")
ListBox1.AddItem ("3x-2y+1=0")
For x = 0 To 5
y = (3 * x + 1) / 2
ListBox1.AddItem (x & " " & y)
Next x
retta6.Visible = True
ListBox1.AddItem ("traccio retta che passa per punti (1,2),(3,5)")
End Sub

Private Sub CommandButton7_Click()
Rem retta passante per origine assi:manca termine noto
ListBox1.AddItem ("retta passante per origine assi:manca c ")
ListBox1.AddItem ("ax+by=0")
ListBox1.AddItem ("x- 3y = 0")
ListBox1.AddItem ("calcolo valori per retta")
For x = 0 To 10
y = x / 3
ListBox1.AddItem (x & " " & y)
Next x
ListBox1.AddItem ("creo grafico con derive")
retta7.Visible = True

End Sub

Private Sub CommandButton8_Click()
Rem equazione esplicita retta
ListBox1.AddItem ("ax-by+c = 0")
ListBox1.AddItem ("y = -x(a/b) -c/b")
ListBox1.AddItem ("m= -a/b ...q=-c/b ")
ListBox1.AddItem ("y =mx+q ")
ListBox1.AddItem ("3x - 2y +1 = 0")
ListBox1.AddItem ("----------------------")
a = 3
b = -2
c = 1
m = -(a / b)
q = -(c / b)
ListBox1.AddItem ("a = " & a)
ListBox1.AddItem ("b = " & b)
ListBox1.AddItem ("c = " & c)
ListBox1.AddItem ("m = " & m)
ListBox1.AddItem ("q = " & q)
ListBox1.AddItem ("------calcolo valori per punti retta -------")
For x = 0 To 5
y = m * x + q
ListBox1.AddItem (x & " " & y)
Next x
ListBox1.AddItem ("creo grafico con derive ")
retta8.Visible = True
End Sub

Private Sub CommandButton9_Click()
Rem bisettrice 1-3 quadrante
ListBox1.AddItem ("y = x ")
For x = -3 To 3
y = x
ListBox1.AddItem (x & " " & y)
Next x
ListBox1.AddItem ("grafico bisettice ")
retta9.Visible = True
End Sub

vedi rette.ppt