Tuesday, February 5, 2013

புனை பெயர்களும், இணைய எழுத்தாளர்களும்...

மாங்குடி மைனர், நீச்சல்காரன், பிறைகொண்டன், வினையுக்கி செல்வா, பாஸ்டன் பாலாஜி, இலவசகொத்தனார், கெகபிக்குனி, பெனாத்தல் சுரேஷ்.. இதெல்லாம் யாருன்னு தெரியுதா? 

இணையத்தில் உலா வரும் தமிழ் எழுத்தாளர்கள், இவனுங்க வித்தியாசத்துக்கு ஒரு அளவே இல்லையா? ? ? ?         

Friday, February 1, 2013

கடல் - விமர்சனம்




மணிரத்னத்தின் ரசிகன் ஆன நான், இந்த படத்திற்காக ஆவலாக காத்திருந்து முதல் ஷோ பார்த்தேன், உண்மையில் இந்த படம் எனக்கு இன்ப அதிர்ச்சி...
மணிரத்னதினால் இவ்வளவு மொக்கையாக படம் எடுக்க முடியுமா என்று.... 

ரொம்ப சாதாரணமான கதை தான், இரண்டு கிருத்துவர்கள், அரவிந்த்சாமி, அர்ஜுன்.. இதில் அரவிந்தசாமி நல்லவர், பாதிரியார் ஆகி, அநாதை சிறுவன் ஹீரோ கௌதம் கார்த்திக்கை எடுத்து வளர்த்துகிறார்.. கெட்டவர் அர்ஜுன் பழைய பகையை மனதில் கொண்டு, ஒரு பெண்ணை கெடுத்து பழி அரவிந்தசாமி மேல் விழும்படி செய்கிறார்.. இங்கு இடைவேளை..... 


இதன் பின்பு அரவிந்தசாமி செய்யாத குற்றத்துக்கு 4 ஆண்டுகள் சிறை தண்டனை அனுபவிக்கிறார்,  கௌதம் அர்ஜுன் உடன் சேர்ந்து கள்ளகடத்தல் என திசை மாறி போகிறார்..இடையில் கன்னியாஸ்திரி துளசி உடன் லவ்.. பின்பு அவளுக்காக கள்ள தொழிலை விட முடிவு செய்கிறார்.. அப்போது தான் தெரிகிறது, அவள் அர்ஜுன் மகள் என்று, பின்பு இவர்கள் லவ் தெரிந்து மகளை கொல்ல அர்ஜுன் துடிக்க, கௌதம் காப்பாற்ற.......... அப்பாடா வழக்கமான கிளைமாக்ஸ் ............     


படத்தின் நிஜமான ஹீரோ அரவிந்தசாமி தான், மனிதர் முதல் பாதியில் ஆர்ப்பாட்டம் இல்லாத நடிப்பில சிறிது நேரம் நம்மை கட்டிபோடுகிறார்..
அதன் பின்பு வழவழ கொழகொழ கதையில் அவருக்கும் வேலை இல்லாமல் போகிறது.. அர்ஜுன் "நான் சைத்தான், சைத்தான் என்று சொல்லிக்கொண்டு வில்லத்தனம் என்று ஏதோ செய்துவிட்டு, கிளைமாக்ஸ் இல் ஹீரோவிடம் அடி வாங்கி, திருந்துகிறார்.. ஹீரோ கௌதம் கார்த்திக் ஆடுகிறார், பாடுகிறார், ஓரளவு நடிக்கிறார், but என்னமோ மிஸ் ஆகுது அவருகிட்ட .. கார்த்திக்கிட்ட இருந்த அந்த ஒரு  துறுதுறுப்பு மிஸ்ஸிங்....

நாயகி "துளசி நாயர்"..15 வயசு பொண்ண இது ? ஆன்ட்டி மாதிரி இருக்கு.. சுத்தமா நடிப்பு சுட்டு போட்டாலும் வரலை.... ராதா பொண்ணன்னு கேக்க வைக்குது..குறிப்பா அந்த காதல் காட்சிகள், பயங்கர எரிச்சல், கொஞ்சம் கூட ஒரு feel இல்லாம, ஸ்கூல் டிராமா மாதிரி இருக்கு... பொன்வண்ணன் படத்துல இருக்கார்..


இந்த கதைக்கு இதுவே ஜாஸ்தின்னு ரஹ்மான் நினைத்து விட்டார் போல.. பின்னணி இசை ரொம்ப சுமார், பாடல்கள் கூட.. ராஜீவ் மேனனின் கேமரா ரொம்ப உழைத்து இருக்கிறது.. காட்சிகள் "Visual Treat".. வசனம் ஜெயமோகன ?
ஒரு வசனம் கூட ஒரு ஈர்ப்பா இல்லை.. படத்துல்ல அர்ஜுன் பாவம் ...பாவம் என்று ஒரு வசனம் பேசுகிறார் ...யாரு படத்துக்கு வந்தவங்களா ? என்று கேட்க தோன்றுகிறது...... திரைக்கதை சுத்தி சுத்தி அடிக்குதுடா சாமி....

மொத்ததில் இந்த மணிரத்னத்தின் கடலில் அலையும் இல்லை, ஆழமும் இல்லை... 


My Rating: 2 / 5 

எதிர்பார்க்கும் விகடன் மார்க்: 39 / 100    

                            
















                
    

Thursday, January 31, 2013

நீயா நானா - இதுவா சுயமரியாதை சுப.வீ ?


நீயாநானா விவாதத்தில் சாதி என்பது 2000 ஆண்டு பழமையானது அதை நூற்றாண்டுகால சாதி எதிர்ப்பு போராட்டத்தால் அழித்துவிடமுடியாது கொஞ்சம் கொஞ்சமாகத்தான் செய்ய முடியும்.என்று குறிப்பிட்டார் சுப.வீ

இது தொடர்ச்சியாக திராவிட மற்றும் போலி சாதி எதிர்ப்பு ஆட்களினால் தங்களது இயலாமையை மறைக்க தொடர்ந்து சொல்லிக்கொண்டு வரும் பொய்.

2000ம் ஆண்டுகால தமிழர்களின் சித்தமருத்துவத்தை நூறாண்டில் அலோபதிக்கு மாற்ற‌ முடிந்தது
2000ம் ஆண்டுகால தமிழர்களின் உணவை  இட்லி தோசையாக நூறாண்டில் மாற்ற முடிந்தது
2000ம் ஆண்டுகால தமிழர்களின் மதிய உணவான புளிக்காய்ச்சலை சாம்பாராக மாற்ற முடிந்தது
2000ம் ஆண்டுகால தமிழர்களின் குடுமியை நூறாண்டுகளில் கிராப்பாக மாற்ற முடிந்தது
2000ம் ஆண்டுகால தேவதாசிகள் ஆடிய சதிர் ஆட்டமென்ற நடனத்தை பரதநாட்டியமாக மாற்றி உச்சியில் தூக்கி வைக்க முடிந்தது
2000ம் ஆண்டுகால தமிழ்பெயர்கள் சுரேஷ், ரமேஷாகி இப்போ ராகுலில் வந்து நிற்க முடிகிறது

ஆனால் சாதியை மட்டும் நூறாண்டுகளில் ஒழிக்க முடியாதாம், அட ஒழிக்க கூட வேண்டாம் சாதியொழிப்பில் எவ்வளவு தூரம் முன்னேறி உள்ளது என்றால் நம் முன் தெரிவது முட்டை தான்.

நூறாண்டுகாலம் என்பது மூன்று தலைமுறை என் தாத்தா தலைமுறை, என் அப்பா தலைமுறை, என் தலைமுறை என மூன்று தலைமுறை பெரியார் தமிழகத்திலே நேர்மையாக உருவாக்கிய சாதிய ஒழிப்பு என்பதை சாதியொழிப்பு முற்போக்கு பேசுபவர்கள் நேர்மையாக கடைபிடித்திருந்தால் இந்த மூன்றாம் தலைமுறையில் மல்ட்டி லெவல் மார்க்கெட்டிங் போல தமிழ்நாட்டில் பாதி பேராவது சாதியை கடந்திருப்பார்கள்.

உண்மையில் சாதியொழியாமல் இருக்க காரணம் சாதி ஆதரவாளர்களால் அல்ல... போலி சாதியொழிப்பாளர்கள் தான் சாதியை காப்பாற்றுகிறார்கள். சுபவீ ஜிங் சாங் கொட்டிக்கொண்டிருக்கும் திமுக தலைவர் அரசியலில் சாதிபார்த்து சீட்டு தருகிறார், கழகத்தின் பொதுச்செயலாளரான அன்பழகனுக்கே முதலியார் கோட்டாவில் சீட்டு கொடுத்திருந்தார்கள். தர்மபுரியின் தலித்களின் மீதான தாக்குதலில் கைதானவர்களில் 10 பேர் பாமக ஆனால் 16 பேர் திமுக, உண்மை அறியும் குழு எல்லாம் அனுப்பிய திமுக அந்த தாக்குதலில் கைதான 16 பேர் மீது என்ன நடவடிக்கை எடுத்தது? நியாயமாக சாதியொழிப்பை பற்றி பேசும் சுப.வீ இதை கருணாநிதியிடம் கண்டிக்க வேண்டாமா? எதிர்த்து பேச வேண்டாமா?  சாதிக்கு ஆதரவளிக்கும் திமுக தலைமைக்கு எதிராக போராட வேண்டாமா? ஏன் திமுகவிடம் மட்டும் ஜால்ரா?


சாதியொழிப்பை நேர்மையாக முன்னெடுத்திருந்தால் சாதியொழிப்பு பேசும் கட்சிகள் குறிப்பாக சமீபமாக ரொம்ப சீன் போடும் திமுக காரர்கள் அனைவரும் சாதி மறுப்பு திருமணம் செய்ய வேண்டும், இல்லையெனில் கட்சியிலிருந்து வெளியே போ என்று நேர்மையான சாதியொழிப்புக்கு போராடலாமே ஆனால் செய்ய மாட்டார்கள், ஏன் தெரியுமா? இவர்களுக்கு எல்லாம் தெரியும், வெளியே சாதியொழிப்பை பேசிக்கொண்டு வீட்டினுள், கட்சியினுள் எல்லாம்  சாதியை காப்பாற்றுபவர்கள்.

நிறைய திருமணங்களை பேராசிரியர் அன்பழகனும், வீரமணியும், முக ஸ்டாலினும் நடத்தியுள்ளார்கள், அவைகள் எல்லாம் சாதி திருமணங்கள் தான், என்ன ஒரே வேறுபாடு என்றால் பார்ப்பன புரோகிதர்களுக்கு பதில் இந்த புரோகிதர்கள், இங்கே நேர்மையான சாதியொழிப்பு இல்லை, நேர்மையான முற்போக்கு இல்லை. நேரடியான சாதி ஆதரவாளர்களை you can identify them, you can argue with them, you can convince them. ஆனால் சாதியொழிப்பு பேசிக்கொண்டே சாதியை வைத்திருக்கும் போலி முற்போக்காளார்கள் வெளிக்காட்டிக்கொள்ளாமல் கொல்லும் எய்ட்ஸ் போன்றவர்கள்.உதாரணமாக சுப.வீ யையும் ஜால்ராமணி ஐ ஆம் ஸாரி வீரமணி அவர்களையும் எடுத்துக்கொள்வோம்.  சாதியொழிப்பை எப்படியாகினும் செய்வேன் என்ற உறுதியிருந்திருந்தால் சாதியின் அடிப்படை, பார்ப்பனியத்தின் அடிப்படை பிறப்பால் வேறுபாடு பார்ப்பது, இன்று திமுகவின் தலைமை பதவிச்சண்டையில் இருப்பவர்கள் கருணாநிதிக்கு பிறந்த மகன்கள் ஸ்டாலின் மற்றும் அழகிரி. திமுகவின் தலைமை பதவியின் அடிப்படை ஸ்டாலினுக்கும் அழகிரிக்கும் பிறப்பால் கிடைக்கிறது.

பார்ப்பனியத்தை எதிர்ப்பதாக சொல்லும் ஜால்ராமணியின் திகவின் தலைமை பொறுப்புக்கு தயாராக இருப்பவர் ஜால்ராமணியின் மகன் அன்புராஜ், இது பார்ப்பனியம் இல்லையா?

பெரியார் சொல்லிக்கொடுத்தது சுயமரியாதை, காரைக்குடியில் திராவிடமணி என்ற ஒரு திக தலைவர், 90களின் மத்தியில் அவரது மகனை 10-12 வயதான  சிறுவனை தம்பி என்று தான் அழைக்க வேண்டும், இல்லையென்றால் திராவிடமணிக்கு கோபம் வந்துவிடும், சுயமரியாதையை அடிப்படையாக கொண்ட திராவிட கழகத்தின் தொண்டர்கள் அந்த சிறுவனை சுயமரியாதையை விட்டுவிட்டு தம்பி தம்பி என்று குழைவார்கள்.

சாதியொழிப்பிற்காக நேர்மையாக போராடாமல் பதவிக்காக சாதி, பணத்துக்காக சாதி, அதிகாரத்துக்காக சாதி, விசுவாசத்துக்காக என அவர்களின் சாதி நடவடிக்கைகளை ஆதரித்து விட்டு வாயால் சாதியொழிக என வடை சுட்டால் நூறாண்டுகள் அல்ல சுப.வீ அய்யா ரெண்டாயிரம் ஆண்டுகள் ஆனாலும் உங்களை போன்ற போலிகளால் சாதியை ஒழிக்க முடியாது.

இதே நேரத்தில் கொளத்தூர் மணி, கோவை ராமக்கிருஷ்ணன், புதுவை லோகு அய்யப்பன் போன்ற நேர்மையான சாதி எதிர்ப்பாளர்களும் இருக்கிறார்கள் என்பதை குறிப்பிட்டே ஆக வேண்டும் ஆனால் இவர்களின் எண்ணிக்கை மிக குறைவே. நமது வட்டத்திலேயே குறிப்பிட்டு சொல்ல வேண்டுமெனில் சுகுணா திவாகர் சாதி மறுப்பு திருமணம் தான் செய்வேன் என்று பெண் பார்த்து வேறு சாதியில் தான் திருமணம் செய்தார்(அவருடையது காதல் திருமணம் அல்ல) இவர்களைத்தான் நாம் ஆதரிக்க வேண்டும், போற்ற வேண்டும் போலிகளை அல்ல...



Wednesday, January 30, 2013

விஸ்வரூபம் விமர்சனம் (எனது பார்வையில்) ...


ரூ. 50, 100 கொடுத்துவிட்டு 3 மணிநேர மசாலாவை எதிர்பார்பவர்கள் கண்டிப்பாக தவிர்க்க வேண்டிய படம் இது...உலக சினிமாவை பார்த்து விட்டு நம்ம ஊர்லயும் இப்படி ஒரு படம் வருமா என்று ஏங்குபவர்கள் கொண்டாடவேண்டிய படம் இது .பெரும போராட்டத்துக்கு பிறகு பெங்களூர்இல் பார்த்துவிட்டு எழுதும் விமர்சனம் இது ....

மெதுவாக ஆரம்பித்து எக்ஸ்பிரஸ் வேகம் எடுக்கும் கதை.. இந்திய சினிமாக்களின் சாபக்கேடான மாஸ் ஹீரோ introduction இல்லாமல் ரொம்ப சாதாரணமாக அறிமுகம் ஆகும் பொழுதே தெரிந்து விடுகிறது இது 20 வருடம் கழித்து வரவேண்டிய படம் என்று.. முதல் அரை மணி நேரம் கொஞ்சம் போர் அடித்தாலும் அதன் பிறகு ஆப்கானிஸ்தான், தீவிரவாதி என திரைகதை சர சர என வேகம் எடுக்கிறது.

அமெரிக்காவில் Ph.D படிக்கும் நிருபமா, குடியுரிமைக்காக நடன ஆசிரியர் கமலை திருமணம் செய்து கொள்கிறார். அதிக வயது வித்தியாசம் காரணமாக கமல் மேல் ஆசை இல்லாமல், தனது "Boss"  மேல் கள்ள காதல் கொள்ளுகிறார் நிருபமா.. கமலை விவாகரத்து செய்ய காரணம் வேண்டி ஒரு உளவாளி வைக்கிறார்.. கமலை பின்தொடரும் உளவாளி திடீரென கொல்லபடுகிறார்.. அதன் பின் கமல் நடன ஆசிரியர் அல்ல, அவர் ஒரு முஸ்லிம், அல்-கொய்தா பயிற்சி பெற்ற தீவிரவாதி என தெரிகிறது.கதை ஆப்கானிஸ்தானில் விரிகிறது.



இந்திய உளவு அமைப்பான "ரா" பிரிவால் அனுப்பப்பட்ட அதிகாரி கமல், தீவிரவாதிகளுடன் இருந்து அவர்களது திட்டங்களை உளவு சொல்லுகிறார்..
கமல் யார் என அவர்களுக்கு தெரிந்த பின்பு அங்கிருந்து  தப்பி அமெரிக்காவில் தலைமறைவு வாழ்கை வாழ்கிறார்.. இறுதியில் மிகப்பெரிய தீவிரவாத தாக்குதலில் இருந்து "நியூ யார்க்" நகரத்தை காப்பாற்றுகிறார்.. இது தான் சுருக்கமான கதை...

கமல் நினைத்து இருந்தால் இந்த படத்தை பெரிய மாஸ் ஹீரோ Build -up உடன் எடுத்திருக்கலாம்.. ஆனால் எதார்த்தத்துடன், லாஜிக் mistake இல்லாமல் எடுத்திருக்கிறார்.. குறிப்பாக அந்த ஆப்கானிஸ்தான் சம்பந்தப்பட்ட காட்சிகள் ஹாலிவுட்கே சவால் விடும்படி அமைந்திருக்கிறது.OSCAR விருதை வென்ற "தி ஹர்ட் லாக்கர்" படம் கூட இவ்வளவு நுணுக்கமாக தீவிரவாதம் பற்றி ஆராயவில்லை. கமல் உழைப்பையும், பணத்தையும் கொட்டி இருக்கிறார்.


NATO படை உடன் தீவிரவாதிகள் மோதும் காட்சி தத்ரூபம், குண்டுகள் திரை இல் வெடித்து சிதறுவது, நம்மை பதைபதைக்க வைக்கிறது. இரு வேறு கதை பாத்திரங்களில் கமல் வாழ்ந்து இருக்கிறார். அண்ட்ரியா, ராகுல் போஸ், பூஜா குமார் சிறப்பாக நடித்துள்ளனர். "Auro 3D " மிக தெளிவான ஒலிபதிவு, ஆப்கானிஸ்தான், அமெரிக்கா என இரண்டு இடங்களிலும் அசத்தும் கேமரா, தத்ரூபமான "Art - Direction", எடிட்டிங் என தரமான தொழில்நுட்பம் உள்ள கூட்டணி அமைந்து இருக்கிறது.



படத்தின் முக்கிய குறை பின்னணி இசை, சில விறுவிறுப்பான காட்சிகளில் வெறும் மௌனமே பின்னணி இசையாக இருப்பதால், அந்த காட்சியில் உள்ள த்ரில் குறைந்து போகிறது. இந்த பகுதியில் இன்னும் கொஞ்சம் மெனகெட்டு இருக்கலாம்..படத்தின் ஒரு 10 நொடி காட்சியில், மரண தண்டனைக்கு முன்னால் "குரான்" ஓதுவது போல வருகிறது.. இது ஒருவேளை முஸ்லிம்களை காயபடுத்தலாம். இந்த காட்சி கொஞ்சம் மனதை நெருடுகிறது. இதை தவிர்த்து வேறு எந்த ஒரு காட்சியும் எந்த மதத்தையும் இழிவு படுத்தவில்லை. இந்த படம் வேறு எந்த நாட்டில் வந்து இருந்தாலும் மிகப்பெரிய பாராட்டை பெற்றிருக்கும். உலக திரைபட விழாக்களில் விருதுகளும், பாராட்டுகளும் நிச்சயம்...

படம் பார்த்தவுடன் எனக்குள் ஒரு வினா?.. அப்படி சட்டம் ஒழுங்கு கேட்டு போக என்ன இருக்கிறது இந்த படத்தில் என்று.. இந்த படத்தை தடை செய்து விட்டால், தமிழ்நாடு அமைதி பூங்கா ஆகிவிடுமா?, தீவிரவாதிகள் ஆயுத்தை கீழே போட்டுவிட்டு சரண் அடைவார்களா? எல்லை தாண்டிய பயங்கரவாதம் நின்றுவிடுமா ???  "ஒட்டு பொறுக்கி" அரசியல்வாதிக்கு இது புரிந்தால் சரி...     இது உலக சினிமா..உள்ளூர் ஊர் குருவிகளுக்கு புரியாது... கமல் தமிழனாய் பிறந்ததை தவிர வேறு எந்த தவறும் செய்யவில்லை போலும்....

கமலின் இந்த விஸ்வரூபம், சிலரின் நிஜ சுயரூபத்தை கிழித்து காட்டுகிறது...
தமிழ்நாட்டு மக்கள் பிப்.6 வரை காத்திருக்க வேண்டும் போல...

உலக சினிமா கொடுத்த உலக நாயகனுக்கு நெஞ்சார்ந்த நன்றிகள்..... மொத்தத்தில் இந்த படம் கமலுக்கு  மணிமகுடம், தமிழ் சினிமாவுக்கு வைர கிரீடம்...

Rating : 4.4 / 5  
      
பின்குறிப்பு: எதிர்பார்க்கும் விகடன் மார்க் 48 / 100 










       




       

Thursday, January 3, 2013

தமிழ் கொலை

ஆப்பிள் ஷோரூமில் ரூ.7.5 கோடி பொருட்கள் கொல்லை

பொழுது போகலைனு நியூஸ் படிக்க ஆன் லைன்ல போன அங்க இத படிச்சு மயக்கம் வந்துடிச்சு. இது இந்த லட்சணத்துல இது  யாஹூவோட நியூஸ் பேஜ் வேற ..
பொருட்கள் கொள்ளைனு போடறதுக்கு, கொல்லைன்னு  போட்டு இருக்கான் இந்த கொள்ளைல போறவன்..... எல்லாம் இந்த Translate English script படுத்தறபாடு..
மொதல்ல தமிழ ஒழுங்கா படிங்கப்பா ... அப்புறம் நியூஸ் எழுத வரலாம் ....     

Adukkam (most beautiful valley in kodaikanal)


                     Road Trip to Kodaikanal and Thekkadi


ஒவ்வொரு வருஷமும் தீபாவளிக்கு எங்கயாவது போகறதுண்டு.. சரி இந்த வருஷமும் கூர்க் போகலாம்னு ஷங்கர் படம் மாதிரி budget  போட்டு கடைசில பேரரசு படம்  மாதிரி லோ budget ல பைகல எங்கயாவது போலம்நு முடிவு பண்ணோம்.. Google புண்ணியத்துல ஒரு location கிடச்சுது.  கொடைக்கானல்ல இருந்து பெரியகுளம் போற வழில அடுக்கம்னு ஒரு place முடிவு பண்ணோம்.  



ஒரு நாள் முழுசும் கொடைக்கானல் சுத்தி பார்த்த பின்னால அடுக்கம் போனோம். அப்பிடியே தேக்கடி ஒரு ரவுண்டு போயி வந்தோம்.  





 Nothing Special in Thekkady, as usually boating and spicy and cardamom..but we had seen one more Non - Popular awesome place in there called " Ramakkalmedu".

Amazing place and that was described as a "Paradise in the world" by Leo darno DeCaprpeo ("Titanic Jack")...Ref: Wikipedia...
Seriously that was great viewpoint for Tamilnadu and Kerala..




There is a huge statue called "Kuravan Kurathi" also nice..


We started there at 4PM and reached home at 12AM next day...

Saturday, July 26, 2008

The Bresenham line algorithm, is an algorithm that determines which points in an n-dimensional raster should be plotted in order to form a close approximation to a straight line between two given points. It is commonly used to draw lines on a computer screen, as it uses only integer addition, subtraction and bit shifting all of which are very cheap operations in standard computer architectures. It is one of the earliest algorithms developed in the field of computer graphics.
Through a minor expansion, the original algorithm for lines can also be used to draw circles. Also this can be done with simple arithmetic operations; quadratic or trigonometric expressions can be avoided or recursively dissolved into simpler steps.
The mentioned properties make it still an important algorithm, and it is used among others in plotters, in graphics chips of modern graphics cards, and in many graphics libraries. As it is so simple, it is not only implemented in the firmware of such devices, but is also cast into hardware of those graphics chips.
To be precise, the label "Bresenham" is today often used for a whole family of algorithms, which have actually been developed by others, later, yet in succession of Bresenham and with a similar basic approach. See deeper references below.
Contents
[hide]
1 The algorithm
2 Generalization
3 Optimization
4 History
5 Similar algorithms
6 References
7 See also
8 External links
//
[edit] The algorithm


Illustration of the result of Bresenham's line algorithm. (0,0) is at the top left corner.
The common conventions that pixel coordinates increase in the down and right directions and that pixel centers have integer coordinates will be used. The endpoints of the line are the pixels at (x0, y0) and (x1, y1), where the first coordinate of the pair is the column and the second is the row.
The algorithm will be initially presented only for the octant in which the segment goes down and to the right (x0≤x1 and y0≤y1 ) , and its horizontal projection x1 − x0 is longer than the vertical projection y1 − y0 (in other words, the line has a slope less than 1 and greater than 0.) In this octant, for each column x between x0 and x1, there is exactly one row y (computed by the algorithm) containing a pixel of the line, while each row between y0 and y1 may contain multiple rasterized pixels.
Bresenham's algorithm chooses the integer y corresponding to the pixel center that is closest to the ideal (fractional) y for the same x; on successive columns y can remain the same or increase by 1. The general equation of the line through the endpoints is given by:
Since we know the column, x, the pixel's row, y, is given by rounding this quantity to the nearest integer:
The slope (y1 − y0) / (x1 − x0) depends on the endpoint coordinates only and can be precomputed, and the ideal y for successive integer values of x can be computed starting from y0 and repeatedly adding the slope.
In practice, the algorithm can track, instead of possibly large y values, a small error value between −0.5 and 0.5: the vertical distance between the rounded and the exact y values for the current x. Each time x is increased, the error is increased by the slope; if it exceeds 0.5, the rasterization y is increased by 1 (the line continues on the next lower row of the raster) and the error is decremented by 1.0.
In the following pseudocode sample plot(x,y) plots a point and abs returns absolute value: function line(x0, x1, y0, y1) int deltax := x1 - x0 int deltay := y1 - y0 real error := 0 real deltaerr := deltay / deltax // Assume deltax != 0 (line is not vertical) int y := y0 for x from x0 to x1 plot(x,y) error := error + deltaerr if abs(error) ≥ 0.5 then y := y + 1 error := error - 1.0
[edit] Generalization
Actually this first formation was done by Bresenham.This first version only handles lines that descend to the right. We would of course like to be able to draw all lines. The first case is allowing us to draw lines that still slope downwards but head in the opposite direction. This is a simple matter of swapping the initial points if x0 > x1. Trickier is determining how to draw lines that go up. To do this, we check if y0 ≥ y1; if so, we step y by -1 instead of 1. Lastly, we still need to generalize the algorithm to drawing lines in all directions. Up until now we have only been able to draw lines with a slope less than one. To be able to draw lines with a steeper slope, we take advantage of the fact that a steep line can be reflected across the line y=x to obtain a line with a small slope. The effect is to switch the x and y variables throughout, including switching the parameters to plot. The code looks like this: function line(x0, x1, y0, y1) boolean steep := abs(y1 - y0) > abs(x1 - x0) if steep then swap(x0, y0) swap(x1, y1) if x0 > x1 then swap(x0, x1) swap(y0, y1) int deltax := x1 - x0 int deltay := abs(y1 - y0) real error := 0 real deltaerr := deltay / deltax int ystep int y := y0 if y0 < y1 then ystep := 1 else ystep := -1 for x from x0 to x1 if steep then plot(y,x) else plot(x,y) error := error + deltaerr if error ≥ 0.5 then y := y + ystep error := error - 1.0
The function now handles all lines and implements the complete Bresenham's algorithm.
[edit] Optimization
The problem with this approach is that computers operate relatively slowly on fractional numbers like error and deltaerr; moreover, errors can accumulate over many floating-point additions. Working with integers will be both faster and more accurate. The trick we use is to multiply all the fractional numbers above by deltax, which enables us to express them as integers. The only problem remaining is the constant 0.5—to deal with this, we change the initialization of the variable error. The new program looks like this:
(This implementation does not work. See article discussion.) function line(x0, x1, y0, y1) boolean steep := abs(y1 - y0) > abs(x1 - x0) if steep then swap(x0, y0) swap(x1, y1) if x0 > x1 then swap(x0, x1) swap(y0, y1) int deltax := x1 - x0 int deltay := abs(y1 - y0) int error := -(deltax + 1) / 2 int ystep int y := y0 if y0 < y1 then ystep := 1 else ystep := -1 for x from x0 to x1 if steep then plot(y,x) else plot(x,y) error := error + deltay if error ≥ 0 then y := y + ystep error := error - deltax
[edit] History
The algorithm was developed by Jack E. Bresenham in 1962 at IBM. In 2001 Bresenham wrote:
"I was working in the computation lab at IBM's San Jose development lab. A Calcomp plotter had been attached to an IBM 1401 via the 1407 typewriter console. [The algorithm] was in production use by summer 1962, possibly a month or so earlier. Programs in those days were freely exchanged among corporations so Calcomp (Jim Newland and Calvin Hefte) had copies. When I returned to Stanford in Fall 1962, I put a copy in the Stanford comp center library.
A description of the line drawing routine was accepted for presentation at the 1963 ACM national convention in Denver, Colorado. It was a year in which no proceedings were published, only the agenda of speakers and topics in an issue of Communications of the ACM. A person from the IBM Systems Journal asked me after I made my presentation if they could publish the paper. I happily agreed, and they printed it in 1965."
Bresenham's algorithm was later modified to produce circles, the resulting algorithm being sometimes known as either "Bresenham's circle algorithm" or Midpoint circle algorithm.
[edit] Similar algorithms
The Bresenham algorithm can be interpretated as slightly modified DDA (Using 0.5 as error threshold instead of 0, which is required for non-overlapping polygon rasterizing).
The principle of using an incremental error in place of division operations has other applications in graphics. It is possible to use this technique to calculate the U,V co-ordinates during raster scan of texture mapped polygons. The voxel heightmap software-rendering engines seen in some PC games also used this principle.
Bresenham also published a Run-Slice (as opposed to the Run-Length) computational algorithm.