تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
حل ورسم الاعداد المركبة بمنتهى السهولة
#1
كاتب الموضوع : حسين احمد طالب

السلام عليكم ورحمة الله وبركاته
اليوم ابيين كيف نحل مسائل الاعداد المركبة ونرسمها
ماهو العدد المركب
الصيغة المثلثية
X+iy

الصيغة الدائرية
z=r*exp(jtheta)
يتكون العدد المركب من جزئيين حقيقي وخيالي

قد تعطى لنا مسئلة مكونة من مجموعة اعداد مركبة مضروبة ببعضها اومقسومة بصيغة دائري poler اومثلثي
ومطلوب منا رسمها وحلها









خير وسيلة هيا الربط بين الدوت نت ولماتلاب بداية نكون دالة في الماتلاب ترسل لها سترنك تحمل العدد المركب وهيا تحله وتعديد الجواب من جزء حقيقي وخيالي ونرسم الاعداد في الجوت نت

اذن تكتب هذه الدالة في الماتلاب ونحولها الى ملف DLL باستخدام dot net bulder هكذا


كود :
[color=#000000][COLOR=#0000bb][/color][color=#007700]function [[/color][color=#0000bb]y[/color][color=#007700]]=[/color][color=#0000bb]drawingcomplex[/color][color=#007700]([/color][color=#0000bb]string12[/color][COLOR=#007700])
try
    [/COLOR][color=#0000bb]z[/color][color=#007700]=eval([/color][color=#0000bb]string12[/color][COLOR=#007700]);
[/COLOR][color=#0000bb]y[/color][color=#007700]([/color][color=#0000bb]1[/color][color=#007700])=[/color][color=#0000bb]real[/color][color=#007700]([/color][color=#0000bb]z[/color][COLOR=#007700]);
[/COLOR][color=#0000bb]y[/color][color=#007700]([/color][color=#0000bb]2[/color][color=#007700])=[/color][color=#0000bb]imag[/color][color=#007700]([/color][color=#0000bb]z[/color][COLOR=#007700]);
catch
    [/COLOR][color=#0000bb]y[/color][color=#007700]=[/color][COLOR=#dd0000]'error cannot find this result'
[/COLOR][COLOR=#0000bb]end
  
end  
[/COLOR][/COLOR]




خطوات التحويل الى DLL
نكتب امر deploytool tool في ال command windows



لاحذ الدالة التي كوناها اشرنا عليها لاننا سوف نضيفها الى class الذي نكونه في هذه الخطوة





الان نحوله الى ملف dll باستخدام الزر الذي تدخل اليه اسهم




وبهذا نكون قد كونا دالة في تعيد لنا جزء حقيقي وخيالي نضيفها الى مشروعنا

ملف ال DLL الموجود بهذا المسار الخاص بالتعامل مع المصفوفات
وهو MWArray.dll
\C:\Program Files\MATLAB\R2010a\toolbox\dotnetbuilder\bin\win3 2\v2.0




وفي زر بدء الرسم نكتب هذه الاسطر





كود :
[color=#000000][COLOR=#0000bb]Button1[/color][color=#007700].[/color][color=#0000bb]Enabled [/color][color=#007700]= [/color][COLOR=#0000bb]False
        Button1[/COLOR][color=#007700].[/color][color=#0000bb]Text [/color][color=#007700]= [/color][COLOR=#dd0000]"  انتضر"
        

        [/COLOR][COLOR=#007700]Try

            [/COLOR][color=#0000bb]ListBox1[/color][color=#007700].[/color][color=#0000bb]Items[/color][color=#007700].[/color][color=#0000bb]Clear[/color][COLOR=#007700]()
            [/COLOR][color=#0000bb]Dim test [/color][color=#007700]As New [/color][COLOR=#0000bb]Class1Draw
            [/COLOR][COLOR=#dd0000]'عرفنا كائن من نوع الكلاس الذي صممناه بالماتلاب
            x = test.drawingcomplex(Convert.ToString(fdrawtxt.Text))
            '[/COLOR][color=#0000bb]TextBox1[/color][color=#007700].[/color][color=#0000bb]Text [/color][color=#007700]= [/color][color=#0000bb]Convert[/color][color=#007700].[/color][color=#0000bb]ToString[/color][color=#007700]([/color][color=#0000bb]x[/color][COLOR=#007700])
            [/COLOR][color=#0000bb]ax [/color][color=#007700]= [/color][color=#0000bb]Convert[/color][color=#007700].[/color][color=#0000bb]ToDouble[/color][color=#007700]([/color][color=#0000bb]Convert[/color][color=#007700].[/color][color=#0000bb]ToString[/color][color=#007700]([/color][color=#0000bb]x[/color][color=#007700]([/color][color=#0000bb]1[/color][COLOR=#007700])))
            [/COLOR][color=#0000bb]ay [/color][color=#007700]= [/color][color=#0000bb]Convert[/color][color=#007700].[/color][color=#0000bb]ToDouble[/color][color=#007700]([/color][color=#0000bb]Convert[/color][color=#007700].[/color][color=#0000bb]ToString[/color][color=#007700]([/color][color=#0000bb]x[/color][color=#007700]([/color][color=#0000bb]2[/color][COLOR=#007700])))

            If [/COLOR][color=#0000bb]ay [/color][color=#007700]> [/color][COLOR=#0000bb]0 Then
                ListBox1[/COLOR][color=#007700].[/color][color=#0000bb]Items[/color][color=#007700].[/color][color=#0000bb]Add[/color][color=#007700]([/color][color=#0000bb]Convert[/color][color=#007700].[/color][color=#0000bb]ToString[/color][color=#007700]([/color][color=#0000bb]x[/color][color=#007700]([/color][color=#0000bb]1[/color][color=#007700])) & [/color][color=#dd0000]"+" [/color][color=#007700]& [/color][color=#0000bb]Convert[/color][color=#007700].[/color][color=#0000bb]ToString[/color][color=#007700]([/color][color=#0000bb]x[/color][color=#007700]([/color][color=#0000bb]2[/color][color=#007700])) & [/color][color=#dd0000]"i"[/color][COLOR=#007700])
            Else
                [/COLOR][color=#0000bb]ListBox1[/color][color=#007700].[/color][color=#0000bb]Items[/color][color=#007700].[/color][color=#0000bb]Add[/color][color=#007700]([/color][color=#0000bb]ax [/color][color=#007700]& [/color][color=#0000bb]ay [/color][color=#007700]& [/color][color=#dd0000]"i"[/color][COLOR=#007700])
            [/COLOR][color=#0000bb]End [/color][COLOR=#007700]If

            [/COLOR][color=#0000bb]ListBox1[/color][color=#007700].[/color][color=#0000bb]Items[/color][color=#007700].[/color][color=#0000bb]Add[/color][color=#007700]([/color][color=#dd0000]"Real=" [/color][color=#007700]& [/color][color=#0000bb]ax[/color][COLOR=#007700])
            [/COLOR][color=#0000bb]ListBox1[/color][color=#007700].[/color][color=#0000bb]Items[/color][color=#007700].[/color][color=#0000bb]Add[/color][color=#007700]([/color][color=#dd0000]"imag=" [/color][color=#007700]& [/color][color=#0000bb]ay[/color][COLOR=#007700])
            [/COLOR][color=#0000bb]ra [/color][color=#007700]= [/color][color=#0000bb]Math[/color][color=#007700].[/color][color=#0000bb]Sqrt[/color][color=#007700](([/color][color=#0000bb]ax [/color][color=#007700]* [/color][color=#0000bb]ax[/color][color=#007700]) + ([/color][color=#0000bb]ay [/color][color=#007700]* [/color][color=#0000bb]ay[/color][COLOR=#007700]))
            [/COLOR][COLOR=#dd0000]'تحميل صورة جديدة على مربع الصورة
            Dim II As New Bitmap(Me.PictureBox1.Width, Me.PictureBox1.Height)
            Me.PictureBox1.Image = II

            '  [/COLOR][COLOR=#0000bb]تحديد قلم المحاور غير ضروري في جميع الخطوات
            Dim mypen [/COLOR][color=#007700]As New [/color][color=#0000bb]Pen[/color][color=#007700]([/color][color=#0000bb]Color[/color][color=#007700].[/color][color=#0000bb]Black[/color][color=#007700], [/color][color=#0000bb]4[/color][COLOR=#007700])
            [/COLOR][color=#0000bb]mypen[/color][color=#007700].[/color][color=#0000bb]Alignment [/color][color=#007700]= [/color][color=#0000bb]Drawing2D[/color][color=#007700].[/color][color=#0000bb]PenAlignment[/color][color=#007700].[/color][COLOR=#0000bb]Center
            mypen[/COLOR][color=#007700].[/color][color=#0000bb]StartCap [/color][color=#007700]= [/color][color=#0000bb]Drawing2D[/color][color=#007700].[/color][color=#0000bb]LineCap[/color][color=#007700].[/color][COLOR=#0000bb]ArrowAnchor
            mypen[/COLOR][color=#007700].[/color][color=#0000bb]EndCap [/color][color=#007700]= [/color][color=#0000bb]Drawing2D[/color][color=#007700].[/color][color=#0000bb]LineCap[/color][color=#007700].[/color][COLOR=#0000bb]ArrowAnchor
            [/COLOR][COLOR=#dd0000]'استدعاء دالة رسم المنحني
            BegindrawALXsfuncompex(Graphics.FromImage(Me.PictureBox1.Image), New Point(Me.PictureBox1.Width \ 2, Me.PictureBox1.Height \ 2), Me.Font, (Me.PictureBox1.Width \ 72) - 1, (Me.PictureBox1.Width \ 72) - 1, (Me.PictureBox1.Height \ 72) - 1, (Me.PictureBox1.Height \ 72) - 1, 2.6, mypen, New Pen(Color.Red, 2))
            '[/COLOR][COLOR=#0000bb]قتل القلم بعد الانهاء  
            mypen[/COLOR][color=#007700].[/color][color=#0000bb]Dispose[/color][COLOR=#007700]()
            [/COLOR][color=#0000bb]Beep[/color][COLOR=#007700]()
        Catch [/COLOR][color=#0000bb]ex [/color][color=#007700]As [/color][COLOR=#0000bb]Exception
            MsgBox[/COLOR][color=#007700]([/color][color=#0000bb]ex[/color][color=#007700].[/color][color=#0000bb]Message[/color][color=#007700], [/color][color=#dd0000]"Error "[/color][COLOR=#007700])
        [/COLOR][color=#0000bb]End [/color][COLOR=#007700]Try

        [/COLOR][color=#0000bb]Button1[/color][color=#007700].[/color][color=#0000bb]Text [/color][color=#007700]= [/color][COLOR=#dd0000]"بدء الرسم"
        [/COLOR][color=#0000bb]Button1[/color][color=#007700].[/color][color=#0000bb]Enabled [/color][color=#007700]= [/color][COLOR=#0000bb]True  
[/COLOR][/COLOR]



وهذه الدالة التي تخص الرسم



كود :
[color=#000000][COLOR=#0000bb]Sub BegindrawALXsfuncompex[/color][color=#007700]([/color][color=#0000bb]ByVal Gr [/color][color=#007700]As [/color][color=#0000bb]Graphics[/color][color=#007700], [/color][color=#0000bb]ByVal StartPoint [/color][color=#007700]As [/color][color=#0000bb]Point[/color][color=#007700], [/color][color=#0000bb]ByVal NumFont [/color][color=#007700]As [/color][color=#0000bb]Font[/color][color=#007700], [/color][color=#0000bb]Optional ByVal Right_x_Long [/color][color=#007700]As [/color][color=#0000bb]Integer [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700], [/color][color=#0000bb]Optional ByVal Left_x_Long [/color][color=#007700]As [/color][color=#0000bb]Integer [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700], [/color][color=#0000bb]Optional ByVal Right_y_Long [/color][color=#007700]As [/color][color=#0000bb]Integer [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700], [/color][color=#0000bb]Optional ByVal Left_y_Long [/color][color=#007700]As [/color][color=#0000bb]Integer [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700], [/color][color=#0000bb]Optional ByVal XXX [/color][color=#007700]As [/color][color=#0000bb]Single [/color][color=#007700]= [/color][color=#0000bb]1[/color][color=#007700], [/color][color=#0000bb]Optional ByVal Line_pen [/color][color=#007700]As [/color][color=#0000bb]Pen [/color][color=#007700]= [/color][color=#0000bb]Nothing[/color][color=#007700], [/color][color=#0000bb]Optional ByVal Fun_pen [/color][color=#007700]As [/color][color=#0000bb]Pen [/color][color=#007700]= [/color][color=#0000bb]Nothing[/color][COLOR=#007700])
        Try
            Const [/COLOR][color=#0000bb]bbb [/color][color=#007700]As [/color][color=#0000bb]Integer [/color][color=#007700]= [/color][COLOR=#0000bb]100
            [/COLOR][color=#007700]If [/color][COLOR=#0000bb]Line_pen Is Nothing Then
                Line_pen [/COLOR][color=#007700]= New [/color][color=#0000bb]Pen[/color][color=#007700]([/color][color=#0000bb]Color[/color][COLOR=#007700].Empty)
            [/COLOR][color=#0000bb]End [/color][COLOR=#007700]If
            If [/COLOR][COLOR=#0000bb]Fun_pen Is Nothing Then
                Fun_pen [/COLOR][color=#007700]= [/color][color=#0000bb]Pens[/color][color=#007700].[/color][COLOR=#0000bb]Black
            End [/COLOR][COLOR=#007700]If

            [/COLOR][color=#0000bb]Gr[/color][color=#007700].[/color][color=#0000bb]DrawLine[/color][color=#007700]([/color][color=#0000bb]Line_pen[/color][color=#007700], [/color][color=#0000bb]CInt[/color][color=#007700]([/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]- (([/color][color=#0000bb]Left_x_Long [/color][color=#007700]+ [/color][color=#0000bb]0.5[/color][color=#007700]) * [/color][color=#0000bb]bbb[/color][color=#007700])), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y[/color][color=#007700], [/color][color=#0000bb]CInt[/color][color=#007700]([/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ (([/color][color=#0000bb]Right_x_Long [/color][color=#007700]+ [/color][color=#0000bb]0.5[/color][color=#007700]) * [/color][color=#0000bb]bbb[/color][color=#007700])), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y[/color][COLOR=#007700])
            [/COLOR][COLOR=#dd0000]' رسم المحور السيني غير ضروري
            Gr.DrawLine(Line_pen, StartPoint.X, CInt(StartPoint.Y - ((Right_y_Long + 0.5) * bbb)), StartPoint.X, CInt(StartPoint.Y + ((Left_y_Long + 0.5) * bbb)))
            '
            [/COLOR][color=#007700]For [/color][color=#0000bb]f [/color][color=#007700]As [/color][color=#0000bb]Single [/color][color=#007700]= -[/color][COLOR=#0000bb]Left_x_Long To Right_x_Long Step 0.5
                [/COLOR][color=#007700]If [/color][color=#0000bb]f [/color][color=#007700]<> [/color][color=#0000bb]CInt[/color][color=#007700]([/color][color=#0000bb]f[/color][color=#007700]) [/color][COLOR=#0000bb]Then
                    Gr[/COLOR][color=#007700].[/color][color=#0000bb]DrawLine[/color][color=#007700](New [/color][color=#0000bb]Pen[/color][color=#007700]([/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Color[/color][color=#007700], [/color][color=#0000bb]2[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]- [/color][color=#0000bb]1 [/color][color=#007700]- [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ [/color][color=#0000bb]1 [/color][color=#007700]+ [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][COLOR=#007700])
                Else
                    [/COLOR][color=#0000bb]Gr[/color][color=#007700].[/color][color=#0000bb]DrawLine[/color][color=#007700](New [/color][color=#0000bb]Pen[/color][color=#007700]([/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Color[/color][color=#007700], [/color][color=#0000bb]2[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]- [/color][color=#0000bb]2 [/color][color=#007700]- [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ [/color][color=#0000bb]2 [/color][color=#007700]+ [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][COLOR=#007700])
                    If [/COLOR][color=#0000bb]Not f [/color][color=#007700]= [/color][color=#0000bb]0 Then Gr[/color][color=#007700].[/color][color=#0000bb]DrawString[/color][color=#007700]([/color][color=#0000bb]f[/color][color=#007700], [/color][color=#0000bb]NumFont[/color][color=#007700], New [/color][color=#0000bb]SolidBrush[/color][color=#007700]([/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Color[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ [/color][color=#0000bb]5[/color][COLOR=#007700])
                [/COLOR][color=#0000bb]End [/color][COLOR=#007700]If
            [/COLOR][COLOR=#0000bb]Next

            [/COLOR][color=#007700]For [/color][color=#0000bb]f [/color][color=#007700]As [/color][color=#0000bb]Single [/color][color=#007700]= -[/color][COLOR=#0000bb]Right_y_Long To Left_y_Long Step 0.5
                [/COLOR][color=#007700]If [/color][color=#0000bb]f [/color][color=#007700]<> [/color][color=#0000bb]CInt[/color][color=#007700]([/color][color=#0000bb]f[/color][color=#007700]) [/color][COLOR=#0000bb]Then
                    Gr[/COLOR][color=#007700].[/color][color=#0000bb]DrawLine[/color][color=#007700](New [/color][color=#0000bb]Pen[/color][color=#007700]([/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Color[/color][color=#007700], [/color][color=#0000bb]2[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]- [/color][color=#0000bb]1 [/color][color=#007700]- [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ [/color][color=#0000bb]1 [/color][color=#007700]+ [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][COLOR=#007700]))
                Else
                    [/COLOR][color=#0000bb]Gr[/color][color=#007700].[/color][color=#0000bb]DrawLine[/color][color=#007700](New [/color][color=#0000bb]Pen[/color][color=#007700]([/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Color[/color][color=#007700], [/color][color=#0000bb]2[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]- [/color][color=#0000bb]2 [/color][color=#007700]- [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ [/color][color=#0000bb]2 [/color][color=#007700]+ [/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Width[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][COLOR=#007700]))
                    If [/COLOR][color=#0000bb]Not f [/color][color=#007700]= [/color][color=#0000bb]0 Then Gr[/color][color=#007700].[/color][color=#0000bb]DrawString[/color][color=#007700](-[/color][color=#0000bb]f[/color][color=#007700], [/color][color=#0000bb]NumFont[/color][color=#007700], New [/color][color=#0000bb]SolidBrush[/color][color=#007700]([/color][color=#0000bb]Line_pen[/color][color=#007700].[/color][color=#0000bb]Color[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X [/color][color=#007700]+ [/color][color=#0000bb]5[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]+ ([/color][color=#0000bb]f [/color][color=#007700]* [/color][color=#0000bb]bbb[/color][COLOR=#007700]))
                [/COLOR][color=#0000bb]End [/color][COLOR=#007700]If
            [/COLOR][COLOR=#0000bb]Next
            [/COLOR][COLOR=#dd0000]'===================
            x_axis(0) = StartPoint.X + ax * bbb
            '[/COLOR][COLOR=#0000bb]وضعنا اشارة سالبة لان قيمة  الواي على الفورم  
            [/COLOR][COLOR=#dd0000]'تزداد  كلما اتجهنا الى الاسفل والاحداتيات تزداد لالاعلى لذالك طرحنا
            y_asxis(0) = StartPoint.Y - ay * bbb
            Dim Po1 As New Point(StartPoint.X, StartPoint.Y)
            Dim Po2 As New Point(x_axis(0), y_asxis(0))


            Dim Curvepoints As PointF() = {Po1, Po2}
            Gr.DrawCurve(New Pen(Color.Blue, 2), Curvepoints)

            ' [/COLOR][color=#0000bb]the complement [/color][color=#007700]for [/color][COLOR=#0000bb]the curve
            y_asxis[/COLOR][color=#007700]([/color][color=#0000bb]0[/color][color=#007700]) = [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]- (-[/color][color=#0000bb]1 [/color][color=#007700]* [/color][color=#0000bb]ay[/color][color=#007700]) * [/color][COLOR=#0000bb]bbb
            Dim Po21 [/COLOR][color=#007700]As New [/color][color=#0000bb]Point[/color][color=#007700]([/color][color=#0000bb]x_axis[/color][color=#007700]([/color][color=#0000bb]0[/color][color=#007700]), [/color][color=#0000bb]y_asxis[/color][color=#007700]([/color][color=#0000bb]0[/color][COLOR=#007700]))

            [/COLOR][color=#0000bb]Dim Curvepoints12 [/color][color=#007700]As [/color][color=#0000bb]PointF[/color][color=#007700]() = {[/color][color=#0000bb]Po1[/color][color=#007700], [/color][color=#0000bb]Po21[/color][COLOR=#007700]}
            [/COLOR][color=#0000bb]Gr[/color][color=#007700].[/color][color=#0000bb]DrawCurve[/color][color=#007700]([/color][color=#0000bb]Pens[/color][color=#007700].[/color][color=#0000bb]Red[/color][color=#007700], [/color][color=#0000bb]Curvepoints12[/color][COLOR=#007700])






            [/COLOR][color=#0000bb]y_asxis[/color][color=#007700]([/color][color=#0000bb]0[/color][color=#007700]) = [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y [/color][color=#007700]- [/color][color=#0000bb]ay [/color][color=#007700]* [/color][COLOR=#0000bb]bbb
            Dim Po12 [/COLOR][color=#007700]As New [/color][color=#0000bb]Point[/color][color=#007700]([/color][color=#0000bb]x_axis[/color][color=#007700]([/color][color=#0000bb]0[/color][color=#007700]), [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y[/color][COLOR=#007700])
            [/COLOR][color=#0000bb]Dim Curvepoints1 [/color][color=#007700]As [/color][color=#0000bb]PointF[/color][color=#007700]() = {[/color][color=#0000bb]Po12[/color][color=#007700], [/color][color=#0000bb]Po2[/color][COLOR=#007700]}
            [/COLOR][color=#0000bb]Gr[/color][color=#007700].[/color][color=#0000bb]DrawCurve[/color][color=#007700]([/color][color=#0000bb]Pens[/color][color=#007700].[/color][color=#0000bb]Gold[/color][color=#007700], [/color][color=#0000bb]Curvepoints1[/color][COLOR=#007700])







            [/COLOR][color=#0000bb]Dim Po121 [/color][color=#007700]As New [/color][color=#0000bb]Point[/color][color=#007700]([/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X[/color][color=#007700], [/color][color=#0000bb]y_asxis[/color][color=#007700]([/color][color=#0000bb]0[/color][COLOR=#007700]))
            [/COLOR][color=#0000bb]Dim Curvepoints11 [/color][color=#007700]As [/color][color=#0000bb]PointF[/color][color=#007700]() = {[/color][color=#0000bb]Po121[/color][color=#007700], [/color][color=#0000bb]Po2[/color][COLOR=#007700]}
            [/COLOR][color=#0000bb]Gr[/color][color=#007700].[/color][color=#0000bb]DrawCurve[/color][color=#007700]([/color][color=#0000bb]Pens[/color][color=#007700].[/color][color=#0000bb]Gold[/color][color=#007700], [/color][color=#0000bb]Curvepoints11[/color][COLOR=#007700])
            [/COLOR][COLOR=#dd0000]'  Gr.DrawLine(Pens.Yellow, StartPoint.X, 0, 0, yx)
            ' [/COLOR][color=#0000bb]Gr[/color][color=#007700].[/color][color=#0000bb]DrawEllipse[/color][color=#007700]([/color][color=#0000bb]Pens[/color][color=#007700].[/color][color=#0000bb]Gold[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]X[/color][color=#007700], [/color][color=#0000bb]StartPoint[/color][color=#007700].[/color][color=#0000bb]Y[/color][color=#007700], [/color][color=#0000bb]ra[/color][color=#007700], [/color][color=#0000bb]ra[/color][COLOR=#007700])
            [/COLOR][color=#0000bb]MsgBox[/color][color=#007700]([/color][color=#0000bb]x_axis[/color][color=#007700]([/color][color=#0000bb]0[/color][color=#007700]) & [/color][color=#dd0000]"=" [/color][color=#007700]& [/color][color=#0000bb]y_asxis[/color][color=#007700]([/color][color=#0000bb]0[/color][COLOR=#007700]))
        Catch [/COLOR][color=#0000bb]ex [/color][color=#007700]As [/color][COLOR=#0000bb]Exception
            MsgBox[/COLOR][color=#007700]([/color][color=#0000bb]ex[/color][color=#007700].[/color][color=#0000bb]Message[/color][color=#007700], [/color][color=#dd0000]"Error "[/color][COLOR=#007700])
        [/COLOR][color=#0000bb]End [/color][COLOR=#007700]Try

    [/COLOR][COLOR=#0000bb]End Sub  
[/COLOR][/COLOR]







حسين احمد
}}}}
تم الشكر بواسطة:
#2

وهذا المثال


الملفات المرفقة
.rar   01302695588.rar (الحجم : 1.28 م ب / التحميلات : 20)
}}}}
تم الشكر بواسطة:


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم