Click here to Skip to main content
15,911,646 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Costing terrain paths [modified] Pin
Kevnar9-Nov-06 3:40
Kevnar9-Nov-06 3:40 
GeneralRe: Costing terrain paths Pin
ricecake9-Nov-06 4:09
ricecake9-Nov-06 4:09 
GeneralRe: Costing terrain paths Pin
Kevnar9-Nov-06 4:16
Kevnar9-Nov-06 4:16 
GeneralRe: Costing terrain paths Pin
ricecake9-Nov-06 4:37
ricecake9-Nov-06 4:37 
GeneralRe: Costing terrain paths [modified] Pin
Kevnar9-Nov-06 5:24
Kevnar9-Nov-06 5:24 
GeneralRe: Costing terrain paths Pin
ricecake9-Nov-06 5:48
ricecake9-Nov-06 5:48 
GeneralRe: Costing terrain paths Pin
Kevnar9-Nov-06 6:05
Kevnar9-Nov-06 6:05 
GeneralRe: Costing terrain paths Pin
ricecake9-Nov-06 6:46
ricecake9-Nov-06 6:46 
Well, I don't think you need to scale the y values to calculate θ...

Examples:
x=1, y=1:
θ = atan(1/1) = atan(1) = π / 4 = 45 degrees

x=1, y=255 (a very tall slope):
&theta: = atan(255/1) = atan(255) = 1.566 = 89.775 degrees (almost a vertical wall, which makes sense if you are going from a square at height 0 to a square at height 255.

--
Marcus Kwok

GeneralRe: Costing terrain paths Pin
Kevnar9-Nov-06 7:14
Kevnar9-Nov-06 7:14 
GeneralRe: Costing terrain paths Pin
ricecake9-Nov-06 7:21
ricecake9-Nov-06 7:21 
GeneralRe: Costing terrain paths Pin
Kevnar9-Nov-06 7:31
Kevnar9-Nov-06 7:31 
GeneralRe: Costing terrain paths Pin
ejuanpp9-Nov-06 3:43
ejuanpp9-Nov-06 3:43 
GeneralRe: Costing terrain paths Pin
Kevnar9-Nov-06 4:13
Kevnar9-Nov-06 4:13 
QuestionBeginners question? Where does the exact double value go? Pin
ClockDivider8-Nov-06 6:48
ClockDivider8-Nov-06 6:48 
AnswerRe: Beginners question? Where does the exact double value go? Pin
Rob Graham8-Nov-06 7:09
Rob Graham8-Nov-06 7:09 
GeneralRe: Beginners question? Where does the exact double value go? Pin
Dan Neely8-Nov-06 7:24
Dan Neely8-Nov-06 7:24 
GeneralRe: Beginners question? Where does the exact double value go? Pin
ClockDivider8-Nov-06 8:15
ClockDivider8-Nov-06 8:15 
QuestionScaling - help me Pin
dharani7-Nov-06 0:06
dharani7-Nov-06 0:06 
AnswerRe: Scaling - help me Pin
Jörgen Sigvardsson7-Nov-06 13:02
Jörgen Sigvardsson7-Nov-06 13:02 
GeneralBresenhams algorithm for drawing lines Pin
Jörgen Sigvardsson6-Nov-06 12:59
Jörgen Sigvardsson6-Nov-06 12:59 
GeneralRe: Bresenhams algorithm for drawing lines Pin
Luc Pattyn6-Nov-06 13:43
sitebuilderLuc Pattyn6-Nov-06 13:43 
GeneralRe: Bresenhams algorithm for drawing lines Pin
Jörgen Sigvardsson6-Nov-06 14:03
Jörgen Sigvardsson6-Nov-06 14:03 
GeneralRe: Bresenhams algorithm for drawing lines Pin
Bassam Abdul-Baki6-Nov-06 13:45
professionalBassam Abdul-Baki6-Nov-06 13:45 
GeneralRe: Bresenhams algorithm for drawing lines Pin
Jörgen Sigvardsson6-Nov-06 14:09
Jörgen Sigvardsson6-Nov-06 14:09 
GeneralRe: Bresenhams algorithm for drawing lines Pin
Michael Dunn7-Nov-06 15:27
sitebuilderMichael Dunn7-Nov-06 15:27 

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.