Click here to Skip to main content
15,881,172 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945937-Aug-11 10:48
Member 41945937-Aug-11 10:48 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? [modified] Pin
BillWoodruff7-Aug-11 14:30
professionalBillWoodruff7-Aug-11 14:30 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945937-Aug-11 15:34
Member 41945937-Aug-11 15:34 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945937-Aug-11 15:59
Member 41945937-Aug-11 15:59 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff7-Aug-11 17:40
professionalBillWoodruff7-Aug-11 17:40 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945938-Aug-11 17:57
Member 41945938-Aug-11 17:57 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff16-Aug-11 18:36
professionalBillWoodruff16-Aug-11 18:36 
QuestionRaytracing render quality [modified] Pin
Thomas.D Williams31-Jul-11 11:48
Thomas.D Williams31-Jul-11 11:48 
Ray trace image[^]
As you can see by the image there are considerable artifacts in the render output. I have no idea where to start with this issue. I can post code on request. This is a standard Raytracing model of shooting rays from the camera.
Does anybody know how to fix artifacts like this? (The lines between the triangles even though they touch)

Made in VS2010 c# using a picture box and one image I made in Photoshop

Thank you all Smile | :)

[edit]algorithm posted[/edit]
Here is the algorithm I am using. A lot of extra features removed for simplicity. But this is its core.
C#
for (int X = 0; X < Width; X++)
{
    for (int Y = 0; Y < Height; Y++)
    {
        Ray TRay = new Ray(V3.Zero(), V3.Normalize(new V3(X - HalfWidth, 20f, Y - HalfHeight)));
        foreach (Triangle TempTriangle in SceneTriangles)
        {
            Intersection TInter = TempTriangle.Intersects(TRay);
            if (TInter.Hits) Temp.SetPixel(X, Y, CalculateColour(TInter, ColourMode.Lambert));
        }
    }
}


A ray is defined as a start point and a direction
V3 is a 3D vector
Intersection stores: V3 of impact, If it hit, colour of pixel on triangle
Thomas Williams - Chimp Twist
modified on Monday, August 1, 2011 5:33 AM

AnswerRe: Raytracing render quality Pin
Richard MacCutchan31-Jul-11 22:53
mveRichard MacCutchan31-Jul-11 22:53 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams31-Jul-11 23:44
Thomas.D Williams31-Jul-11 23:44 
GeneralRe: Raytracing render quality Pin
David19875-Aug-11 1:07
David19875-Aug-11 1:07 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams5-Aug-11 5:00
Thomas.D Williams5-Aug-11 5:00 
QuestionUnsigned Integer Mod/Remainder Pin
John Paul Walker28-Jul-11 13:11
John Paul Walker28-Jul-11 13:11 
AnswerRe: Unsigned Integer Mod/Remainder Pin
Dr.Walt Fair, PE28-Jul-11 19:18
professionalDr.Walt Fair, PE28-Jul-11 19:18 
GeneralRe: Unsigned Integer Mod/Remainder Pin
John Paul Walker29-Jul-11 13:40
John Paul Walker29-Jul-11 13:40 
GeneralRe: Unsigned Integer Mod/Remainder Pin
Dr.Walt Fair, PE30-Jul-11 17:23
professionalDr.Walt Fair, PE30-Jul-11 17:23 
AnswerRe: Unsigned Integer Mod/Remainder Pin
David198729-Jul-11 20:41
David198729-Jul-11 20:41 
QuestionHow to find estimated time remaining ? Pin
yogish29326-Jul-11 0:53
yogish29326-Jul-11 0:53 
AnswerRe: How to find estimated time remaining ? Pin
Richard MacCutchan26-Jul-11 3:00
mveRichard MacCutchan26-Jul-11 3:00 
GeneralRe: How to find estimated time remaining ? Pin
yogish29326-Jul-11 4:27
yogish29326-Jul-11 4:27 
GeneralRe: How to find estimated time remaining ? Pin
Richard MacCutchan26-Jul-11 4:46
mveRichard MacCutchan26-Jul-11 4:46 
QuestionPID control algorithms Pin
Wjousts21-Jul-11 8:47
Wjousts21-Jul-11 8:47 
AnswerRe: PID control algorithms Pin
Roger Wright21-Jul-11 12:12
professionalRoger Wright21-Jul-11 12:12 
GeneralRe: PID control algorithms Pin
Wjousts21-Jul-11 13:45
Wjousts21-Jul-11 13:45 
AnswerRe: PID control algorithms Pin
Bernhard Hiller31-Jul-11 19:42
Bernhard Hiller31-Jul-11 19:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.