Oops, my output doesn't need to be a 3d model. I could just set the pixels of a BMP based on my raytracing, right?
So I just answered myself here. Silly me.
Type: Posts; User: sahil_m
Oops, my output doesn't need to be a 3d model. I could just set the pixels of a BMP based on my raytracing, right?
So I just answered myself here. Silly me.
Hi,
I would like to write a raytracer, but before I start I would like some help.
1) What should I know in order to learning raytracing? (I am fluent in basic C and can handle
linked lists...
1.Open the file you want to copy stuff from.
2.Search for the desired text using strcmp.
3.Write it into the new file.
The best way would be to pick up your high school text books again, that is if you still have them. Otherwise buy any book on basic Calculus.
Regarding URLs, you should know where to look for them.
Ninestar, what is a bubble loop?
You'll need to learn dynamic memory allocation to acheive that, I suggest you read on that topic, you can look up your compiler docs for malloc(), that's one function that facilitates dynamic memory...
What do you think this forum is, your personal genie?
First of all it's not a good idea to have global variables in your code when you dont need them to be global.Next your "j" counter is running up to size whereas it should have been size-1.
Here's...
I dont have a C compiler with me right now, if you have any syntactical errors, tell me about them, or else wait for someone else to help you.
the_winky_files:
If you dont know what a stack or a queue is, how do you expect yourself to be able to implement postfix evaluation and modify an already written program which manipulates a queue?...
What do you mean by this?
You already have a main() in your program, what is it that you want help with?
I've never heard of boolean variables in C?
Oh!, I am sorry I made a typo, but you should have figured that out yourself, the function prototype and the definition dont match, I am fixing that right now.
All you need to do is keep dividing the number by 10, your remainder will be the LSD from the integer then store the digits in reverse order.
Thus if you have a 4 digit number, the remainder you...
Hi,
I have made some changes to your program, read my comments.
#include <stdio.h>
int display (int nums[5][5]); /*This function will return the total*/
Hi Alex,
From your code i figure that your using "Turbo C/C++" under DOS and your "fire program" uses the standard Borland Graphics Interface(BGI) for 2d drawing.
I also have that compiler/IDE...
Well, I have another solution:-
printf("*");
printf("\n**");
printf("\n***");
printf("\n****");
printf("\n*****");
You can't do that, your array bounds must be a constant value and since N is an integer it cant be used for defining the size of your array.
You could solve this issue by either doing this:-
...
thanks to both of you.
Hi,
I've already written some code to add two polynomials(one variable) stored in a linked list.
The Basic Node structure looks like this:
struct node
{
int coeff;
It would be really nice if you read http://cboard.cprogramming.com/showthread.php?t=71094 this code of mine, though I dont think I could pay you :)
struct node
{
int data;
struct node *next;
};
typedef struct node * nodeptr;
Why is the above code a bad idea, besides the obvious pitfall:-
Hi,
I am sorry for bumping such an old thread, but I think bumping it is better than starting a new one based on the same topic.
I would really like someone to check out my code and tell me if...
Hi,
Alright i'll try to gather what you just told me:-
1.My create_list should look like this:-
nodeptr create_list(size_t node)
{