Find the answer to your Linux question:
Results 1 to 5 of 5
I'm trying to implement DDA and bresenham's line drawing algorithm. The code is from the book "Computer Graphics" by Donald Hearn and M.Pauline Baker. I am able to run the ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    6

    Line drawing algorithm

    I'm trying to implement DDA and bresenham's line drawing algorithm. The code is from the book "Computer Graphics" by Donald Hearn and M.Pauline Baker. I am able to run the program using the old Turbo C compiler but I am unable to do so in gcc as there is no device.h files. How can I implement these algorithms, Is there any header file in gcc which can perform the operation of Turbo C's device.h?

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    There are many graphics libraries.
    I think you will be quite happy with SDL, but you will most likely have to install the development package for it, as this is no standard package in most distributions.
    Simple DirectMedia Layer
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    6
    Thanks. I'll try it out.

  4. #4
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    fewwww!!!

    Even I m trying to implement this program in linux. The place where i get stuck is the call to initgraph() what to pass in as the 3rd parameter? for windows its "c:\\tc\\venu\\bgi"
    .I have never programmed on linux (Ubuntu) before I appreciate any little help. Thanks in advance.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  5. #5
    Just Joined!
    Join Date
    Oct 2006
    Posts
    6
    I installed Dosbox in Ubuntu and then used the Turbo C compiler from within Dosbox. Try this method. It will solve your problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...