Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Help with a C++/C Project (Ray Tracer, Canvas)
New Posts  All Forums:Forum Nav:

Help with a C++/C Project (Ray Tracer, Canvas)

post #1 of 4
Thread Starter 
Hey guys. Me and my teacher are working on a project to make a simple Ray Tracer application (give realistic lightning effects to simple 3D objects, like spheres and cubes from various angles). Before he gives me any kind of code of the ray tracer he asked me to create a simple application on visual studio that when i run it, will open a empty white/black window which will be a canvas or even give to each pixel of this canvas a random colour. He told me that on the web there are huge ammounts of examples for something like this but i searched a lot and didn't find anything. Probably because i don't know how to search or what to search for as it's something very specific.
Does any of you programming master's have any idea's to help me or give me some good starting tips or even useful links with examples that i can follow? I will greatly appreciate it!
Thanks in advance and have a nice day biggrin.gif
Alienware 17
(5 items)
 
Sacred Moon
(18 items)
 
 
CPUGraphicsHard DriveOS
Intel Core i7 4700MQ NVidia Geforce GTX 770M Samsung 840 Evo Windows 8.1 x64 
Mouse
Steelseries Rival 
CPUMotherboardGraphicsRAM
Intel Core 2 Quad Q9550 Gigabyte EP45-UD3P Radeon HD 6870 Corsair Dominator 4GB 1066MHz 
Hard DriveHard DriveHard DriveCooling
OCZ Vertex 2E 60GB Seagate Barracuda 500GB Seagate Barracuda 500GB XSPC Raystorm 
CoolingCoolingOSMonitor
Black Ice GTX480 Dual Laing DDC-1T w/ EK Dual Top Windows 7 Ultimate 64-bit Samsung T220HD 
KeyboardPowerCaseMouse
Logitech G15 Silverstone Strider Plus ST75F-P 750W Coolermaster CM 690 II Advanced (Modded) Razer Mamba 
Mouse Pad
Roccat Sense 
  hide details  
Reply
Alienware 17
(5 items)
 
Sacred Moon
(18 items)
 
 
CPUGraphicsHard DriveOS
Intel Core i7 4700MQ NVidia Geforce GTX 770M Samsung 840 Evo Windows 8.1 x64 
Mouse
Steelseries Rival 
CPUMotherboardGraphicsRAM
Intel Core 2 Quad Q9550 Gigabyte EP45-UD3P Radeon HD 6870 Corsair Dominator 4GB 1066MHz 
Hard DriveHard DriveHard DriveCooling
OCZ Vertex 2E 60GB Seagate Barracuda 500GB Seagate Barracuda 500GB XSPC Raystorm 
CoolingCoolingOSMonitor
Black Ice GTX480 Dual Laing DDC-1T w/ EK Dual Top Windows 7 Ultimate 64-bit Samsung T220HD 
KeyboardPowerCaseMouse
Logitech G15 Silverstone Strider Plus ST75F-P 750W Coolermaster CM 690 II Advanced (Modded) Razer Mamba 
Mouse Pad
Roccat Sense 
  hide details  
Reply
post #2 of 4
Should be a combination of this class, and the Graphics class.

At least that's what I did when I did the blackjack programmers challenge. Which I never submitted my work to frown.gif

Of course that depends on what version of Visual Studio you are working in, I can't remember if 2013 and 2010 have C in them.
Croissant
(15 items)
 
  
CPUMotherboardGraphicsRAM
2600k Asus Sabertooth Z77 GTX 680 2x4 gigs G-SKill 
Hard DriveOptical DriveCoolingOS
Crucial C300 2x Asus DVD-RW Silver Arrow Win 7 
MonitorPowerCaseAudio
Dual ASUS 24" Rosewill 750 Capstone Corsair Carbide Air 540 The Basic sound blaster Z-Series 
  hide details  
Reply
Croissant
(15 items)
 
  
CPUMotherboardGraphicsRAM
2600k Asus Sabertooth Z77 GTX 680 2x4 gigs G-SKill 
Hard DriveOptical DriveCoolingOS
Crucial C300 2x Asus DVD-RW Silver Arrow Win 7 
MonitorPowerCaseAudio
Dual ASUS 24" Rosewill 750 Capstone Corsair Carbide Air 540 The Basic sound blaster Z-Series 
  hide details  
Reply
post #3 of 4
EDIT: Disregard...
Micro Dance
(8 items)
 
  
CPUMotherboardGraphicsRAM
i7-4790k z97i-plus EVGA GTX980 SC 16GB Team Xtreme 2400 
Hard DriveCoolingOSCase
512GB Samsung SSD 830 NH-L12 Windows 10 EVGA Hadron Air 
  hide details  
Reply
Micro Dance
(8 items)
 
  
CPUMotherboardGraphicsRAM
i7-4790k z97i-plus EVGA GTX980 SC 16GB Team Xtreme 2400 
Hard DriveCoolingOSCase
512GB Samsung SSD 830 NH-L12 Windows 10 EVGA Hadron Air 
  hide details  
Reply
post #4 of 4
This sounds like homework to be honest, and if you are having issues finding resource on how to set up a canvas (of any variation) then I question whether you are ready to take on a ray-tracer which are orders of magnitude harder than this. However in order to steer you in the right direction, for unmanaged C/C++ I would be looking into.
1. SDL (easiest)
2. GLUT (next easiest)
3. DirectX / OpenGL Apis (choose one and stick with it).

For excellent resources on the topic of graphics, and maybe even raytracing to an extent I would head on over to Gamedev.net (google it, not sure if I am allowed to link to other fora?)
Felix
(11 items)
 
ESXi 1
(9 items)
 
Dexter
(12 items)
 
CPUMotherboardGraphicsRAM
Intel Core i7 3770S 3.1 GHz Socket 1155 Box  Intel DQ77KB Intel HD4000 integrated gpu STRONTIUM 8GB Sodimm Single DDR3 1600Mhz 
Hard DriveCoolingOSKeyboard
Intel 520 Series SATA3 25nm 120G 2.5' Scythe Kozuti CPU low profile heatsink fan Microsoft Windows 8 Pro w/ Media Centre Corsair Vengeance K90. Performance, MMO, Mechan... 
PowerCaseMouse
Dell 19V 4.62A (Round) PA-10 Original AC Adapter Antec ISK110 VESA Mini-ITX Case, 90-watt adapte... Corsair Vengeance M90. Performance, MMO, Mechan... 
CPUMotherboardGraphicsRAM
Intel Core i7 3770 3.40 GHz 8M LGA1155 Processor Intel DQ77MK Intel HD4000 integrated gpu STRONTIUM 8GB 1600MHz DDR3 Dimm Single Module P... 
Hard DriveCoolingOSCase
SanDisk Blade 4GB Scythe Big Shuriken Rev. 2 ESXi vSphere 5.1 Coolermaster Elite 343 MATX Mini Tower Case Bla... 
Other
Dell X3959 dual port Intel GbE NIC 
CPUMotherboardGraphicsRAM
Intel Ivy Bridge Core i7 3770K Unlocked Quad Core ASUS SABERTOOTH-Z77 PCI-E3.0 x 16 Motherboard Intel HD4000 integrated gpu Corsair Vengeance 16GB (4x4GB) DDR3 1600MHz CL9... 
Hard DriveHard DriveCoolingCooling
Western Digital Scorpio Black 2.5 inch 320GB Western Digital Caviar Raid Edition4 1000GB (1TB) Corsair Cooling Hydro Series H100 Liquid CPU Corsair "Air Series" SP120 Quiet Edition Case Fan 
OSPowerCaseOther
Openfiler 2.99-2 Corsair AX850 850W  Corsair Obsidian 650D Black Mid Tower Case with... Dell Perc 6/i RAID Controller 
  hide details  
Reply
Felix
(11 items)
 
ESXi 1
(9 items)
 
Dexter
(12 items)
 
CPUMotherboardGraphicsRAM
Intel Core i7 3770S 3.1 GHz Socket 1155 Box  Intel DQ77KB Intel HD4000 integrated gpu STRONTIUM 8GB Sodimm Single DDR3 1600Mhz 
Hard DriveCoolingOSKeyboard
Intel 520 Series SATA3 25nm 120G 2.5' Scythe Kozuti CPU low profile heatsink fan Microsoft Windows 8 Pro w/ Media Centre Corsair Vengeance K90. Performance, MMO, Mechan... 
PowerCaseMouse
Dell 19V 4.62A (Round) PA-10 Original AC Adapter Antec ISK110 VESA Mini-ITX Case, 90-watt adapte... Corsair Vengeance M90. Performance, MMO, Mechan... 
CPUMotherboardGraphicsRAM
Intel Core i7 3770 3.40 GHz 8M LGA1155 Processor Intel DQ77MK Intel HD4000 integrated gpu STRONTIUM 8GB 1600MHz DDR3 Dimm Single Module P... 
Hard DriveCoolingOSCase
SanDisk Blade 4GB Scythe Big Shuriken Rev. 2 ESXi vSphere 5.1 Coolermaster Elite 343 MATX Mini Tower Case Bla... 
Other
Dell X3959 dual port Intel GbE NIC 
CPUMotherboardGraphicsRAM
Intel Ivy Bridge Core i7 3770K Unlocked Quad Core ASUS SABERTOOTH-Z77 PCI-E3.0 x 16 Motherboard Intel HD4000 integrated gpu Corsair Vengeance 16GB (4x4GB) DDR3 1600MHz CL9... 
Hard DriveHard DriveCoolingCooling
Western Digital Scorpio Black 2.5 inch 320GB Western Digital Caviar Raid Edition4 1000GB (1TB) Corsair Cooling Hydro Series H100 Liquid CPU Corsair "Air Series" SP120 Quiet Edition Case Fan 
OSPowerCaseOther
Openfiler 2.99-2 Corsair AX850 850W  Corsair Obsidian 650D Black Mid Tower Case with... Dell Perc 6/i RAID Controller 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Help with a C++/C Project (Ray Tracer, Canvas)