SlideShare a Scribd company logo
1 of 15
COMP330.doc
COMP330: Computer Graphics (2015s1)
Assignment 3
Prepared by Scott McCallum (with significant contribution from
Matt Cabanag).
Questions to: [email protected]
Due Date: 11:45pm, Sunday 31 May 2015.
In Assignment 1, we asked you to create a Martian house plan
designer. In Assignment 3, we would like you to create a
program that simulates in 3D a journey from Earth to Mars by
spacecraft.
Please download the file assign3template.zip from the
Assignments section of the COMP330 iLearn space. Import the
project contained therein into Eclipse. Compile (build) the
project, and run it. You will see a perspective view of a portion
of the solar system in the main (larger) viewport. The scene
objects provided initially are the Sun, the Earth and a small
spacecraft (represented by a small sphere). Notice that the Earth
is in orbit around the Sun, and spins on its axis. The smaller
viewport (located below left) is a "top down" (plan) view of the
same scene. Your task is to extend this program by supplying
additional features as set out below.
Please provide two additional small viewports (located below
centre and below right) on the screen. These additional
viewports should be the same size as the one provided (below
left). One of the additional viewports should provide a view of
3D space from the spacecraft's bridge (command deck). The
other one should contain a view of the spacecraft from the
outside at close range. We ask you to provide to the user, in due
course, a means by which he or she could cycle through the
positions on the screen of the four viewports. That is, we would
like the user to have the possibility to select any of the four
viewports to be the main one.
We will not be concerned with the internals of the spacecraft;
however it may be appropriate to display some simple
instrumentation next to the viewport displaying the view from
the bridge. Also, the sizes of planets, interplanetary distances,
orbit periods etc., do not have to be to scale nor exactly in
accord with physics and astronomy.
Further features of the requested program are detailed below
under Tasks.
At first, this assignment may seem quite daunting. However,
you will hopefully be able to make good progress once you have
understood the framework provided (or suggested) to you in the
code template, and have started to make appropriate extensions
to it. Our suggestion is to first think about how you might
manage a solar system with multiple objects (sun, planets,
moons, spaceship, etc.) and then create your desired objects
within that framework. Keep in mind that some objects may be
comprised of multiple smaller objects too. (Remember object
hierarchy).
This assignment is designed to give you practice in the
following aspects of 3D graphics programming:
A. Hierarchical 3D modelling.
B. Constant and activated animations.
C. Dynamic perspective viewing (moving camera around in 3D).
D. Viewports.
E. Use of lighting, texturing.
F. Scene management, generation.
Assignment Template & Support
You are free to use the provided code template as the starting
point for your code development. It gives you some hints on
how to structure your program and guides your strategies on
how to manage a dynamic 3D scene. There are several pre-built
classes and structs you can use to help you understand how
some common things are done in C++, like inheritance and
operator overloads.
Lectures and workshop classes will also provide you with some
of the things you will need to be successful in this assignment.
Tasks
You will be marked out of 40. This mark will be worth 20% of
your final mark for this unit. The requirements are set out
below.
1. (12 marks)
In orbit around Earth: You may have your spacecraft initially in
orbit around the Earth. You may wish to start with a simple
spacecraft design, and add more detail to it later if you have
time. Our suggestion is to make your spacecraft initially
a child of the Earth, to be in geostatic orbit around the Earth.
(This means that the spacecraft is always over the same part of
the Earth, as the Earth spins on its axis.) You might want to
slow down a bit the Earth's spinning at this point. Recall that in
total four viewports are needed, as detailed above.
2. (8 marks)
Toward Mars: For the second stage of your project you should
add at least a model for Mars to your scene. The Earth orbits
slowly around the Sun, and Mars orbits the Sun even more
slowly. Initially the spacecraft orbits the Earth, as in stage 1.
Your program should inform the user when a suitable launch
window (that is, a situation in which Earth and Mars have
favourable positions) occurs. At such time the user should have
the option to launch the spacecraft toward Mars. If launched,
the spacecraft should then follow a transfer orbit toward Mars.
You may like to add a comet or a piece of space junk (or
something else) to your scene to add some variety on the
journey. Finally, your spacecraft nears Mars, and enters Martian
orbit. At this point, we suggest that your spacecraft could be a
child of Mars.
This task is probably the most challenging part of the
assignment. We will try to provide some hints in due course if
needed.
3. (8 marks)
Arriving on Mars: For the third and final stage of your journey,
you could add some detail to your model of Mars. For example,
you could add the two tiny Martian moons, Phoebos and Demos,
to the scene. Also, you could add a little detail to the Martian
surface. Allow the user to choose to descend to the surface.
4. (8 marks)
Further features: Time permitting, you could provide further
features such as:
· use of lighting and shading
· further use of textures
· a more detailed spacecraft
· more realistic space
· hidden surface removal
As a rough guide, each of the above will earn you
approximately 1 mark, up to a maximum of 4 marks for this
stage.
5. (2 marks)
Coding Style: One mark will be awarded for good coding style,
including such aspects as modularity, understandability and
reusability.
6. (2 marks)
Documentation: One mark will be awarded for good
documentation. This does not have to be extensive; but please
inform the user (marker) about the keyboard commands, mouse
actions, etc. that are available, unless they are clear to a user
simply by looking at the screen upon starting up.
Documentation can be supplied as part of your electronic
submission.
Extra Functionality
There will be some of you that will find this selection of objects
and functionality to be insufficient. You are free to add more of
this as you wish. We cannot give you extra marks, but you won't
be marked down either.
Submission
Please submit an exported eclipse project in a .zip file to iLearn
by the due date. Do not include your executable program. Your
documentation can be included in your project folder.
Please format the .zip file as "COMP330_A3_[your student
number].zip".
Questions / Comments
Please direct any questions and comments to [email protected]
or post in the Assignment 3 forum on iLearn.
assignment1.zip
web/a.txt
hello word!
web/main
web/makefile
main: mywebserver.o myinput.o myparser.o myfiles.o
gcc -o main mywebserver.o myinput.o myparser.o
myfiles.o
mywebserver.o: mywebserver.c sys_config.h
gcc -c mywebserver.c
myinput.o: myinput.c sys_config.h
gcc -c myinput.c
myparser.o: myparser.c sys_config.h
gcc -c myparser.c
myfiles.o: myfiles.c sys_config.h
gcc -c myfiles.c
web/myfiles.c
#include"sys_config.h"
#include<stdio.h>
#include<string.h>
#include<unistd.h>
//init the system
void myInitConf()
{
FILE * fp = fopen("./mywebserver.conf","r");
if(fp!=NULL)
{
//make sure is readable
if(access("mywebserver.conf",4)==0)
{
char s[1024];
while(fgets(s,1024,fp)!=NULL)
{
printf("%sn",s);
if(strstr(s,"system_path")!=NULL)
{
char * pos1 = NULL;
char * pos2 = NULL;
pos1 = strchr(s,34);
pos2 = strchr(pos1+1,34);
memset(cur_conf.cur_path,'0',80);
strncpy(cur_conf.cur_path,pos1+1,pos2 - pos1-1);
}
else if(strstr(s,"cur_domin")!=NULL)
{
char * pos1 = NULL;
char * pos2 = NULL;
pos1 = strchr(s,34);
pos2 = strchr(pos1+1,34);
memset(cur_conf.cur_domin,'0',30);
strncpy(cur_conf.cur_domin,pos1+1,pos2 - pos1-1);
}
}
}
else
{
printf("without the access to open filen");
}
}
else
{
printf("open file failuren");
exit(0);
}
fclose(fp);
}
void myOutputFile(char * s)
{
FILE * fp = fopen(s,"r");
if(fp!=NULL)
{
if(access(s,4)==0)
{
char s[1024];
while(fgets(s,1024,fp)!=NULL)
{
printf("%sn",s);
}
}
else
{
printf("lack of the access to candle the filen");
}
}
else
{
printf("can't find the filen");
return;
}
fclose(fp);
}
void doGet(char * str)
{
int length = strlen(str);
char * pos1;
int i;
for(i = 3; i < length;++i)
{
if(str[i]!=32)
{
pos1 = &str[i];
break;
}
}
char s_path[30];
strncpy(s_path,pos1,length -i);
s_path[length - i] = '0';
if(s_path==NULL)
{
printf("the path is nulln");
}
char all_path[100];
strcpy(all_path,cur_conf.cur_path);
strcat(all_path,s_path);
FILE * fp = fopen(all_path,"r");
if(fp!=NULL)
{
if(access(all_path,4)==0)
{
char s[1024];
while(fgets(s,1024,fp)!=NULL)
{
printf("%sn",s);
}
}
else
{
printf("lack of the access to candle the filen");
}
}
else
{
printf("can't find the filen");
return ;
}
fclose(fp);
}
web/myfiles.o
web/myinput.c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include"sys_config.h"
void myinput()
{
char s[100];
printf("please input the commondn");
while(1)
{
gets(s);
//exit
if(strcmp(s,"QUIT_NOW")==0)
{
printf("now exit the systemn");
exit(0);
}
//reload_config
else if(strcmp(s,"RELOAD_CONFIG")==0)
{
printf("now relaod the config...nn");
myInitConf();
memset(s,'0',100);
}
//doget
else if(strstr(s,"GET")!=NULL)
{
doGet(s);
memset(s,'0',100);
}
//do the uri
else if(strstr(s,"http:")!=NULL)
{
myParser(s);
memset(s,'0',100);
}
//error
else
{
printf("invalid input:%sn",s);
memset(s,'0',100);
}
}
}
web/myinput.o
web/myparser.c
#include"sys_config.h"
#include<stdio.h>
#include<string.h>
/*
because if can't connect to network
so the default_main is localhost
*/
//parser the uri
void myParser(char * str)
{
if(str==NULL)
{
printf("the uri is nulln");
return ;
}
char * pos1 = NULL;
char * pos2 = NULL;
pos1 = strchr(str,47);
pos2 = strchr(pos1+2,47);
char * s_path = pos2 + 1;
char domain[30];
memset(domain,'0',30);
int length = pos2 - pos1 - 2;
strncpy(domain,pos1 + 2,length);
domain[length] = '0';
if(strcmp(domain,"localhost")!=0)
{
printf("invalid dominn");
}
else
{
char all_path[100];
strcpy(all_path,cur_conf.cur_path);
strcat(all_path,s_path);
myOutputFile(all_path);
}
}
web/myparser.o
web/mywebserver.c
#include<stdio.h>
#include<string.h>
#include <libgen.h>
#include"sys_config.h"
int main(int argc,char* argv[])
{
chdir(dirname(argv[0]));
myInitConf(); //init the configurations
myinput(); //let user input
}
web/mywebserver.conf
/*this file is include the configuration of system*/
system_path = "./" ;default_path
cur_domin = "localhost" ;default_domain
web/mywebserver.o
web/readme.txt
example_input1:
GET a.txt
example_input2:
http://localhost/a.txt
mywebserver.conf:
sys_path = "./" //you can set the path
cur_domin = "localhost" //you can set the domain
web/sys_config.h
struct sysConf_struct
{
char cur_path[80]; //path
char cur_domin[30]; //domain
};
struct sysConf_struct cur_conf;
extern void myInitConf();
extern void myinput();
extern void doGet(char * path);
extern void myOutputFile(char * s);
extern void myParser(char * str);

More Related Content

Similar to COMP330.docCOMP330 Computer Graphics (2015s1)Assignment 3.docx

SDTO_Plan_Photosynth
SDTO_Plan_PhotosynthSDTO_Plan_Photosynth
SDTO_Plan_PhotosynthAdam Sheppard
 
Petec Google Earth
Petec Google EarthPetec Google Earth
Petec Google Earthdamopsu
 
Google earth
Google earthGoogle earth
Google earthdamopsu
 
#VirtualDesignMaster 3 Challenge 4 - Dennis George
#VirtualDesignMaster 3 Challenge 4 - Dennis George#VirtualDesignMaster 3 Challenge 4 - Dennis George
#VirtualDesignMaster 3 Challenge 4 - Dennis Georgevdmchallenge
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studiesdamopsu
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studiesdamopsu
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studiesdamopsu
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studiesdamopsu
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studiesdamopsu
 
Application of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPsApplication of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPsNAP Events
 
YARCA (Yet Another Raycasting Application) Project
YARCA (Yet Another Raycasting Application) ProjectYARCA (Yet Another Raycasting Application) Project
YARCA (Yet Another Raycasting Application) Projectgraphitech
 
detailed experience
detailed experiencedetailed experience
detailed experienceBryan Yan
 
Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot IRJET Journal
 
Knowledge Formulation For Ai Planning
Knowledge Formulation For Ai PlanningKnowledge Formulation For Ai Planning
Knowledge Formulation For Ai Planningahmad bassiouny
 
Introduction to three.js & Leap Motion
Introduction to three.js & Leap MotionIntroduction to three.js & Leap Motion
Introduction to three.js & Leap MotionLee Trout
 

Similar to COMP330.docCOMP330 Computer Graphics (2015s1)Assignment 3.docx (20)

SDTO_Plan_Photosynth
SDTO_Plan_PhotosynthSDTO_Plan_Photosynth
SDTO_Plan_Photosynth
 
Petec Google Earth
Petec Google EarthPetec Google Earth
Petec Google Earth
 
Domain Driven Design In C#3.0
Domain Driven Design In C#3.0Domain Driven Design In C#3.0
Domain Driven Design In C#3.0
 
Google earth
Google earthGoogle earth
Google earth
 
#VirtualDesignMaster 3 Challenge 4 - Dennis George
#VirtualDesignMaster 3 Challenge 4 - Dennis George#VirtualDesignMaster 3 Challenge 4 - Dennis George
#VirtualDesignMaster 3 Challenge 4 - Dennis George
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studies
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studies
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studies
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studies
 
Google Earth Social Studies
Google Earth Social StudiesGoogle Earth Social Studies
Google Earth Social Studies
 
Application of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPsApplication of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPs
 
YARCA (Yet Another Raycasting Application) Project
YARCA (Yet Another Raycasting Application) ProjectYARCA (Yet Another Raycasting Application) Project
YARCA (Yet Another Raycasting Application) Project
 
detailed experience
detailed experiencedetailed experience
detailed experience
 
Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot
 
427lects
427lects427lects
427lects
 
Knowledge Formulation For Ai Planning
Knowledge Formulation For Ai PlanningKnowledge Formulation For Ai Planning
Knowledge Formulation For Ai Planning
 
Introduction to three.js & Leap Motion
Introduction to three.js & Leap MotionIntroduction to three.js & Leap Motion
Introduction to three.js & Leap Motion
 
Chapter10.pptx
Chapter10.pptxChapter10.pptx
Chapter10.pptx
 
A step towards interactive displays of digital elevation models
A step towards interactive displays of digital elevation modelsA step towards interactive displays of digital elevation models
A step towards interactive displays of digital elevation models
 
ltu-cover6899158065669445093
ltu-cover6899158065669445093ltu-cover6899158065669445093
ltu-cover6899158065669445093
 

More from monicafrancis71118

1. Discuss Blockchains potential application in compensation system.docx
1. Discuss Blockchains potential application in compensation system.docx1. Discuss Blockchains potential application in compensation system.docx
1. Discuss Blockchains potential application in compensation system.docxmonicafrancis71118
 
1. Describe the characteristics of the aging process. Explain how so.docx
1. Describe the characteristics of the aging process. Explain how so.docx1. Describe the characteristics of the aging process. Explain how so.docx
1. Describe the characteristics of the aging process. Explain how so.docxmonicafrancis71118
 
1. Dis. 7Should we continue to collect data on race and .docx
1. Dis. 7Should we continue to collect data on race and .docx1. Dis. 7Should we continue to collect data on race and .docx
1. Dis. 7Should we continue to collect data on race and .docxmonicafrancis71118
 
1. Differentiate crisis intervention from other counseling therapeut.docx
1. Differentiate crisis intervention from other counseling therapeut.docx1. Differentiate crisis intervention from other counseling therapeut.docx
1. Differentiate crisis intervention from other counseling therapeut.docxmonicafrancis71118
 
1. Despite our rational nature, our ability to reason well is ofte.docx
1. Despite our rational nature, our ability to reason well is ofte.docx1. Despite our rational nature, our ability to reason well is ofte.docx
1. Despite our rational nature, our ability to reason well is ofte.docxmonicafrancis71118
 
1. Describe the ethical challenges faced by organizations operating .docx
1. Describe the ethical challenges faced by organizations operating .docx1. Describe the ethical challenges faced by organizations operating .docx
1. Describe the ethical challenges faced by organizations operating .docxmonicafrancis71118
 
1. Describe in your own words the anatomy of a muscle.  This sho.docx
1. Describe in your own words the anatomy of a muscle.  This sho.docx1. Describe in your own words the anatomy of a muscle.  This sho.docx
1. Describe in your own words the anatomy of a muscle.  This sho.docxmonicafrancis71118
 
1. Describe how your attitude of including aspects of health literac.docx
1. Describe how your attitude of including aspects of health literac.docx1. Describe how your attitude of including aspects of health literac.docx
1. Describe how your attitude of including aspects of health literac.docxmonicafrancis71118
 
1. Choose a behavior (such as overeating, shopping, Internet use.docx
1. Choose a behavior (such as overeating, shopping, Internet use.docx1. Choose a behavior (such as overeating, shopping, Internet use.docx
1. Choose a behavior (such as overeating, shopping, Internet use.docxmonicafrancis71118
 
1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docx
1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docx1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docx
1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docxmonicafrancis71118
 
1. Cryptography is used to protect confidential data in many areas. .docx
1. Cryptography is used to protect confidential data in many areas. .docx1. Cryptography is used to protect confidential data in many areas. .docx
1. Cryptography is used to protect confidential data in many areas. .docxmonicafrancis71118
 
1. Compare and contrast steganography and cryptography.2. Why st.docx
1. Compare and contrast steganography and cryptography.2. Why st.docx1. Compare and contrast steganography and cryptography.2. Why st.docx
1. Compare and contrast steganography and cryptography.2. Why st.docxmonicafrancis71118
 
1. Date September 13, 2017 – September 15, 2017 2. Curr.docx
1. Date September 13, 2017 – September 15, 2017 2. Curr.docx1. Date September 13, 2017 – September 15, 2017 2. Curr.docx
1. Date September 13, 2017 – September 15, 2017 2. Curr.docxmonicafrancis71118
 
1. compare and contrast predictive analytics with prescriptive and d.docx
1. compare and contrast predictive analytics with prescriptive and d.docx1. compare and contrast predictive analytics with prescriptive and d.docx
1. compare and contrast predictive analytics with prescriptive and d.docxmonicafrancis71118
 
1. Creating and maintaining relationships between home and schoo.docx
1. Creating and maintaining relationships between home and schoo.docx1. Creating and maintaining relationships between home and schoo.docx
1. Creating and maintaining relationships between home and schoo.docxmonicafrancis71118
 
1. Compare and contrast Strategic and Tactical Analysis and its .docx
1. Compare and contrast Strategic and Tactical Analysis and its .docx1. Compare and contrast Strategic and Tactical Analysis and its .docx
1. Compare and contrast Strategic and Tactical Analysis and its .docxmonicafrancis71118
 
1. Coalition ProposalVaccination Policy for Infectious Disease P.docx
1. Coalition ProposalVaccination Policy for Infectious Disease P.docx1. Coalition ProposalVaccination Policy for Infectious Disease P.docx
1. Coalition ProposalVaccination Policy for Infectious Disease P.docxmonicafrancis71118
 
1. Company Description and Backgrounda. Weight Watchers was cr.docx
1. Company Description and Backgrounda. Weight Watchers was cr.docx1. Company Description and Backgrounda. Weight Watchers was cr.docx
1. Company Description and Backgrounda. Weight Watchers was cr.docxmonicafrancis71118
 
1. Come up with TWO movie ideas -- as in for TWO screenplays that .docx
1. Come up with TWO movie ideas -- as in for TWO screenplays that .docx1. Come up with TWO movie ideas -- as in for TWO screenplays that .docx
1. Come up with TWO movie ideas -- as in for TWO screenplays that .docxmonicafrancis71118
 
1. Choose a case for the paper that interests you. Most choose a .docx
1. Choose a case for the paper that interests you.  Most choose a .docx1. Choose a case for the paper that interests you.  Most choose a .docx
1. Choose a case for the paper that interests you. Most choose a .docxmonicafrancis71118
 

More from monicafrancis71118 (20)

1. Discuss Blockchains potential application in compensation system.docx
1. Discuss Blockchains potential application in compensation system.docx1. Discuss Blockchains potential application in compensation system.docx
1. Discuss Blockchains potential application in compensation system.docx
 
1. Describe the characteristics of the aging process. Explain how so.docx
1. Describe the characteristics of the aging process. Explain how so.docx1. Describe the characteristics of the aging process. Explain how so.docx
1. Describe the characteristics of the aging process. Explain how so.docx
 
1. Dis. 7Should we continue to collect data on race and .docx
1. Dis. 7Should we continue to collect data on race and .docx1. Dis. 7Should we continue to collect data on race and .docx
1. Dis. 7Should we continue to collect data on race and .docx
 
1. Differentiate crisis intervention from other counseling therapeut.docx
1. Differentiate crisis intervention from other counseling therapeut.docx1. Differentiate crisis intervention from other counseling therapeut.docx
1. Differentiate crisis intervention from other counseling therapeut.docx
 
1. Despite our rational nature, our ability to reason well is ofte.docx
1. Despite our rational nature, our ability to reason well is ofte.docx1. Despite our rational nature, our ability to reason well is ofte.docx
1. Despite our rational nature, our ability to reason well is ofte.docx
 
1. Describe the ethical challenges faced by organizations operating .docx
1. Describe the ethical challenges faced by organizations operating .docx1. Describe the ethical challenges faced by organizations operating .docx
1. Describe the ethical challenges faced by organizations operating .docx
 
1. Describe in your own words the anatomy of a muscle.  This sho.docx
1. Describe in your own words the anatomy of a muscle.  This sho.docx1. Describe in your own words the anatomy of a muscle.  This sho.docx
1. Describe in your own words the anatomy of a muscle.  This sho.docx
 
1. Describe how your attitude of including aspects of health literac.docx
1. Describe how your attitude of including aspects of health literac.docx1. Describe how your attitude of including aspects of health literac.docx
1. Describe how your attitude of including aspects of health literac.docx
 
1. Choose a behavior (such as overeating, shopping, Internet use.docx
1. Choose a behavior (such as overeating, shopping, Internet use.docx1. Choose a behavior (such as overeating, shopping, Internet use.docx
1. Choose a behavior (such as overeating, shopping, Internet use.docx
 
1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docx
1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docx1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docx
1. Case 3-4 Franklin Industries’ Whistleblowing (a GVV Case)Natali.docx
 
1. Cryptography is used to protect confidential data in many areas. .docx
1. Cryptography is used to protect confidential data in many areas. .docx1. Cryptography is used to protect confidential data in many areas. .docx
1. Cryptography is used to protect confidential data in many areas. .docx
 
1. Compare and contrast steganography and cryptography.2. Why st.docx
1. Compare and contrast steganography and cryptography.2. Why st.docx1. Compare and contrast steganography and cryptography.2. Why st.docx
1. Compare and contrast steganography and cryptography.2. Why st.docx
 
1. Date September 13, 2017 – September 15, 2017 2. Curr.docx
1. Date September 13, 2017 – September 15, 2017 2. Curr.docx1. Date September 13, 2017 – September 15, 2017 2. Curr.docx
1. Date September 13, 2017 – September 15, 2017 2. Curr.docx
 
1. compare and contrast predictive analytics with prescriptive and d.docx
1. compare and contrast predictive analytics with prescriptive and d.docx1. compare and contrast predictive analytics with prescriptive and d.docx
1. compare and contrast predictive analytics with prescriptive and d.docx
 
1. Creating and maintaining relationships between home and schoo.docx
1. Creating and maintaining relationships between home and schoo.docx1. Creating and maintaining relationships between home and schoo.docx
1. Creating and maintaining relationships between home and schoo.docx
 
1. Compare and contrast Strategic and Tactical Analysis and its .docx
1. Compare and contrast Strategic and Tactical Analysis and its .docx1. Compare and contrast Strategic and Tactical Analysis and its .docx
1. Compare and contrast Strategic and Tactical Analysis and its .docx
 
1. Coalition ProposalVaccination Policy for Infectious Disease P.docx
1. Coalition ProposalVaccination Policy for Infectious Disease P.docx1. Coalition ProposalVaccination Policy for Infectious Disease P.docx
1. Coalition ProposalVaccination Policy for Infectious Disease P.docx
 
1. Company Description and Backgrounda. Weight Watchers was cr.docx
1. Company Description and Backgrounda. Weight Watchers was cr.docx1. Company Description and Backgrounda. Weight Watchers was cr.docx
1. Company Description and Backgrounda. Weight Watchers was cr.docx
 
1. Come up with TWO movie ideas -- as in for TWO screenplays that .docx
1. Come up with TWO movie ideas -- as in for TWO screenplays that .docx1. Come up with TWO movie ideas -- as in for TWO screenplays that .docx
1. Come up with TWO movie ideas -- as in for TWO screenplays that .docx
 
1. Choose a case for the paper that interests you. Most choose a .docx
1. Choose a case for the paper that interests you.  Most choose a .docx1. Choose a case for the paper that interests you.  Most choose a .docx
1. Choose a case for the paper that interests you. Most choose a .docx
 

Recently uploaded

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

COMP330.docCOMP330 Computer Graphics (2015s1)Assignment 3.docx

  • 1. COMP330.doc COMP330: Computer Graphics (2015s1) Assignment 3 Prepared by Scott McCallum (with significant contribution from Matt Cabanag). Questions to: [email protected] Due Date: 11:45pm, Sunday 31 May 2015. In Assignment 1, we asked you to create a Martian house plan designer. In Assignment 3, we would like you to create a program that simulates in 3D a journey from Earth to Mars by spacecraft. Please download the file assign3template.zip from the Assignments section of the COMP330 iLearn space. Import the project contained therein into Eclipse. Compile (build) the project, and run it. You will see a perspective view of a portion of the solar system in the main (larger) viewport. The scene objects provided initially are the Sun, the Earth and a small spacecraft (represented by a small sphere). Notice that the Earth is in orbit around the Sun, and spins on its axis. The smaller viewport (located below left) is a "top down" (plan) view of the same scene. Your task is to extend this program by supplying additional features as set out below. Please provide two additional small viewports (located below centre and below right) on the screen. These additional viewports should be the same size as the one provided (below left). One of the additional viewports should provide a view of 3D space from the spacecraft's bridge (command deck). The
  • 2. other one should contain a view of the spacecraft from the outside at close range. We ask you to provide to the user, in due course, a means by which he or she could cycle through the positions on the screen of the four viewports. That is, we would like the user to have the possibility to select any of the four viewports to be the main one. We will not be concerned with the internals of the spacecraft; however it may be appropriate to display some simple instrumentation next to the viewport displaying the view from the bridge. Also, the sizes of planets, interplanetary distances, orbit periods etc., do not have to be to scale nor exactly in accord with physics and astronomy. Further features of the requested program are detailed below under Tasks. At first, this assignment may seem quite daunting. However, you will hopefully be able to make good progress once you have understood the framework provided (or suggested) to you in the code template, and have started to make appropriate extensions to it. Our suggestion is to first think about how you might manage a solar system with multiple objects (sun, planets, moons, spaceship, etc.) and then create your desired objects within that framework. Keep in mind that some objects may be comprised of multiple smaller objects too. (Remember object hierarchy). This assignment is designed to give you practice in the following aspects of 3D graphics programming: A. Hierarchical 3D modelling. B. Constant and activated animations. C. Dynamic perspective viewing (moving camera around in 3D).
  • 3. D. Viewports. E. Use of lighting, texturing. F. Scene management, generation. Assignment Template & Support You are free to use the provided code template as the starting point for your code development. It gives you some hints on how to structure your program and guides your strategies on how to manage a dynamic 3D scene. There are several pre-built classes and structs you can use to help you understand how some common things are done in C++, like inheritance and operator overloads. Lectures and workshop classes will also provide you with some of the things you will need to be successful in this assignment. Tasks You will be marked out of 40. This mark will be worth 20% of your final mark for this unit. The requirements are set out below. 1. (12 marks) In orbit around Earth: You may have your spacecraft initially in orbit around the Earth. You may wish to start with a simple spacecraft design, and add more detail to it later if you have time. Our suggestion is to make your spacecraft initially a child of the Earth, to be in geostatic orbit around the Earth. (This means that the spacecraft is always over the same part of the Earth, as the Earth spins on its axis.) You might want to slow down a bit the Earth's spinning at this point. Recall that in
  • 4. total four viewports are needed, as detailed above. 2. (8 marks) Toward Mars: For the second stage of your project you should add at least a model for Mars to your scene. The Earth orbits slowly around the Sun, and Mars orbits the Sun even more slowly. Initially the spacecraft orbits the Earth, as in stage 1. Your program should inform the user when a suitable launch window (that is, a situation in which Earth and Mars have favourable positions) occurs. At such time the user should have the option to launch the spacecraft toward Mars. If launched, the spacecraft should then follow a transfer orbit toward Mars. You may like to add a comet or a piece of space junk (or something else) to your scene to add some variety on the journey. Finally, your spacecraft nears Mars, and enters Martian orbit. At this point, we suggest that your spacecraft could be a child of Mars. This task is probably the most challenging part of the assignment. We will try to provide some hints in due course if needed. 3. (8 marks) Arriving on Mars: For the third and final stage of your journey, you could add some detail to your model of Mars. For example, you could add the two tiny Martian moons, Phoebos and Demos, to the scene. Also, you could add a little detail to the Martian surface. Allow the user to choose to descend to the surface. 4. (8 marks) Further features: Time permitting, you could provide further features such as:
  • 5. · use of lighting and shading · further use of textures · a more detailed spacecraft · more realistic space · hidden surface removal As a rough guide, each of the above will earn you approximately 1 mark, up to a maximum of 4 marks for this stage. 5. (2 marks) Coding Style: One mark will be awarded for good coding style, including such aspects as modularity, understandability and reusability. 6. (2 marks) Documentation: One mark will be awarded for good documentation. This does not have to be extensive; but please inform the user (marker) about the keyboard commands, mouse actions, etc. that are available, unless they are clear to a user simply by looking at the screen upon starting up. Documentation can be supplied as part of your electronic submission. Extra Functionality There will be some of you that will find this selection of objects and functionality to be insufficient. You are free to add more of this as you wish. We cannot give you extra marks, but you won't be marked down either.
  • 6. Submission Please submit an exported eclipse project in a .zip file to iLearn by the due date. Do not include your executable program. Your documentation can be included in your project folder. Please format the .zip file as "COMP330_A3_[your student number].zip". Questions / Comments Please direct any questions and comments to [email protected] or post in the Assignment 3 forum on iLearn. assignment1.zip web/a.txt hello word! web/main web/makefile main: mywebserver.o myinput.o myparser.o myfiles.o gcc -o main mywebserver.o myinput.o myparser.o myfiles.o mywebserver.o: mywebserver.c sys_config.h gcc -c mywebserver.c myinput.o: myinput.c sys_config.h gcc -c myinput.c myparser.o: myparser.c sys_config.h gcc -c myparser.c myfiles.o: myfiles.c sys_config.h gcc -c myfiles.c
  • 7. web/myfiles.c #include"sys_config.h" #include<stdio.h> #include<string.h> #include<unistd.h> //init the system void myInitConf() { FILE * fp = fopen("./mywebserver.conf","r"); if(fp!=NULL) { //make sure is readable if(access("mywebserver.conf",4)==0) { char s[1024]; while(fgets(s,1024,fp)!=NULL) { printf("%sn",s); if(strstr(s,"system_path")!=NULL) { char * pos1 = NULL; char * pos2 = NULL; pos1 = strchr(s,34); pos2 = strchr(pos1+1,34); memset(cur_conf.cur_path,'0',80); strncpy(cur_conf.cur_path,pos1+1,pos2 - pos1-1); } else if(strstr(s,"cur_domin")!=NULL) {
  • 8. char * pos1 = NULL; char * pos2 = NULL; pos1 = strchr(s,34); pos2 = strchr(pos1+1,34); memset(cur_conf.cur_domin,'0',30); strncpy(cur_conf.cur_domin,pos1+1,pos2 - pos1-1); } } } else { printf("without the access to open filen"); } } else { printf("open file failuren"); exit(0); } fclose(fp); } void myOutputFile(char * s) { FILE * fp = fopen(s,"r"); if(fp!=NULL) { if(access(s,4)==0) { char s[1024]; while(fgets(s,1024,fp)!=NULL) {
  • 9. printf("%sn",s); } } else { printf("lack of the access to candle the filen"); } } else { printf("can't find the filen"); return; } fclose(fp); } void doGet(char * str) { int length = strlen(str); char * pos1; int i; for(i = 3; i < length;++i) { if(str[i]!=32) { pos1 = &str[i]; break; } } char s_path[30];
  • 10. strncpy(s_path,pos1,length -i); s_path[length - i] = '0'; if(s_path==NULL) { printf("the path is nulln"); } char all_path[100]; strcpy(all_path,cur_conf.cur_path); strcat(all_path,s_path); FILE * fp = fopen(all_path,"r"); if(fp!=NULL) { if(access(all_path,4)==0) { char s[1024]; while(fgets(s,1024,fp)!=NULL) { printf("%sn",s); } } else { printf("lack of the access to candle the filen"); } } else { printf("can't find the filen"); return ; }
  • 11. fclose(fp); } web/myfiles.o web/myinput.c #include<stdio.h> #include<stdlib.h> #include<string.h> #include"sys_config.h" void myinput() { char s[100]; printf("please input the commondn"); while(1) { gets(s); //exit if(strcmp(s,"QUIT_NOW")==0) { printf("now exit the systemn"); exit(0); } //reload_config else if(strcmp(s,"RELOAD_CONFIG")==0) { printf("now relaod the config...nn"); myInitConf(); memset(s,'0',100); } //doget else if(strstr(s,"GET")!=NULL)
  • 12. { doGet(s); memset(s,'0',100); } //do the uri else if(strstr(s,"http:")!=NULL) { myParser(s); memset(s,'0',100); } //error else { printf("invalid input:%sn",s); memset(s,'0',100); } } } web/myinput.o web/myparser.c #include"sys_config.h" #include<stdio.h> #include<string.h> /* because if can't connect to network so the default_main is localhost */ //parser the uri void myParser(char * str) {
  • 13. if(str==NULL) { printf("the uri is nulln"); return ; } char * pos1 = NULL; char * pos2 = NULL; pos1 = strchr(str,47); pos2 = strchr(pos1+2,47); char * s_path = pos2 + 1; char domain[30]; memset(domain,'0',30); int length = pos2 - pos1 - 2; strncpy(domain,pos1 + 2,length); domain[length] = '0'; if(strcmp(domain,"localhost")!=0) { printf("invalid dominn"); } else { char all_path[100]; strcpy(all_path,cur_conf.cur_path); strcat(all_path,s_path); myOutputFile(all_path); } }
  • 14. web/myparser.o web/mywebserver.c #include<stdio.h> #include<string.h> #include <libgen.h> #include"sys_config.h" int main(int argc,char* argv[]) { chdir(dirname(argv[0])); myInitConf(); //init the configurations myinput(); //let user input } web/mywebserver.conf /*this file is include the configuration of system*/ system_path = "./" ;default_path cur_domin = "localhost" ;default_domain web/mywebserver.o web/readme.txt example_input1: GET a.txt example_input2: http://localhost/a.txt mywebserver.conf:
  • 15. sys_path = "./" //you can set the path cur_domin = "localhost" //you can set the domain web/sys_config.h struct sysConf_struct { char cur_path[80]; //path char cur_domin[30]; //domain }; struct sysConf_struct cur_conf; extern void myInitConf(); extern void myinput(); extern void doGet(char * path); extern void myOutputFile(char * s); extern void myParser(char * str);