For faster navigation, this Iframe is preloading the Wikiwand page for خوارزمية رسم مستقيم.

خوارزمية رسم مستقيم

يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (يناير 2022)
هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (مارس 2016)
نقاط على الشبكة المتقطعة تشكل خطوطا مستقيمة بوصلها، المستقيم العلوي يبدو خشناً لأنه يتكون من قيمة واحدة للون نقاطه، بينما المستقيم السفلى يبدو ناعما لأنه يتكون من قيمتين لألوان نقاطه.

خوارزمية رسم مستقيم هي خوارزمية في الرسوميات الحاسوبية من أجل تقريب قطعة مستقيمة في الأوساط الجغرافية المتقطعة كالشاشات التي تحوي بكسلات أو الطابعات النقطية. بينما في الأوساط المستمرة مثل راسم الإشارة ليس هناك أي حاجة لخوارزمية من أجل رسم مستقيم بسبب استخدام ظواهر فيزيائية لعمل ذلك.

خوارزمية بسيطة لرسم مستقيم

[عدل]

dx = x2 - x1
dy = y2 - y1
for x from x1 to x2 {
	y = y1 + (dy) * (x - x1)/(dx)
	plot(x, y)
}

في الكود السابق يتم افتراض أن النقاط مرتبة بحيث أن . تعمل هذه الخوارزمية بشكل جيد عندما يكون ولكنها بطيئة جداً على الحاسوب حيث أنها تتطلب عمليات على أرقام ذات فاصلة عائمة. أما إذا كان فإن المستقيم يصبح خشناً جداً وفي حالة النهايات يتم رسم نقطة وحيدة.

خوارزميات رسم المستقيمات

[عدل]

مراجع

[عدل]
{{bottomLinkPreText}} {{bottomLinkText}}
خوارزمية رسم مستقيم
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?