User Tools

Site Tools


notes:c4eng:fall2024:projects:gtf0

This is an old revision of the document!


GTF0

GRABIT

Just typing in grabit will send you back an error, saying you need a designation and project. It it will then show you a list of designations. You will want c4eng. If you just type in “grabit c4eng” into the prompt, it will still pop back an error, but it will give you a list of projects to pick from. For this specific project, you will want to type in “grabit c4eng gtf0” into the prompt.

NOTE: Make sure you're in the correct directory before you move the files! In this case, you want to be in your repository.

REPOSITORY STEPS

No src? Type into the prompt “fixrepo”. This clones the repositories Matt set up for us this semester. Follow the instructs as they show up on the screen. No need to set up a passkey.

Now, a new directory will appear when you use the ls command, called src. Type in “cd src” to get into this new directory. If you use the command “ls” again, you will see two directories, fall2024 and unix. You will want to cd into fall2024, this is where your semester repository is stored. If you don’t have c4eng as an available directory when you use the ls command, type in “mkdir c4eng“ (mkdir stands for make directory). The cd into the new c4eng. You will keep all of projects here. Nothing is here yet, so you will have to use the grabit command.

BUILD THE CODE

RUN THE PROGRAM

VIEW THE IMAGE

in Lab46, ensure you are in the directory where you executed ” gtf0 “. Run the ” ls “ command, you should see ” gtf0.png “ in your current directory

Run the following move command ” mv gtf0.png ~/public_html “ to move the image file to a viewable website

Run the ” ls “ command, if ” gtf0.png “ is no longer in your current directory then it was successfully moved

In a web browser, navigate to the following URLhttps://lab46.g7n.org/~USERNAME/gtf0.png

replacing ” USERNAME “ with your lab46 username, make sure to keep the tilde ”~“

Your output image should be displayed

If you get a ” 404 not found “ error, run the following command in lab46 ” cd ~/public_html

Then run the command ” ls “, if the following ” gtf0.png “ is not listed as a file contained within the directory it was not successfully moved, review the first step

LIBGD FUNCTIONALITY

MIXING A COLOR

DRAWING A LINE

DRAWING A RECTANGLE

FILLING AN ENCLOSED SPACE

DRAWING A FILLED RECTANGLE

DRAWING A CIRCLE

DRAWING AN ELLIPSE

notes/c4eng/fall2024/projects/gtf0.1725971035.txt.gz · Last modified: 2024/09/10 12:23 by wedge