15,876,943 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Re: Problem in creating dsn using sqlconfigdatasource() David Crow15-Jun-11 2:09 David Crow 15-Jun-11 2:09
 Re: Problem in creating dsn using sqlconfigdatasource() gaspher17-Jun-11 13:06 gaspher 17-Jun-11 13:06
 VPN Server and Client dwk0014-Jun-11 22:34 dwk00 14-Jun-11 22:34
 Equation for a straight line Cyclone_S14-Jun-11 13:48 Cyclone_S 14-Jun-11 13:48
 Re: Equation for a straight line tolw14-Jun-11 19:27 tolw 14-Jun-11 19:27
 Re: Equation for a straight line Cyclone_S15-Jun-11 10:31 Cyclone_S 15-Jun-11 10:31
 Re: Equation for a straight line tolw15-Jun-11 18:56 tolw 15-Jun-11 18:56
 Re: Equation for a straight line Stefan_Lang15-Jun-11 23:48 Stefan_Lang 15-Jun-11 23:48
 This is what's called the explicit function for a straight line, meaning that you calculate one coordinate based on the value of the other coordinate. The explicit representation comes with a few shortcomings that can be confusing at times when you deal with 2D geometrical elements. For example you wouldn't be able to draw a vertical line with an equation like what you posted! Also, for near vertical lines you'd have to take care what values of x would produce a valid y - you'll find that most values of x that lie well within the screen corrdinate range will produce y values that are way outside the screen. The implicit representation avoids this confusion, but it is often much easier to use the parametric representation: In this case, you have two points, A and B. The parametric representation of a line through these two points is: `P(t) = A + t*(B-A)` . This equation is in fact a set of equations, referring to the two coordinates, x and y: ```P(t).x = A.x + t*(B.x-A.x) P(t).y = A.y + t*(B.y-A.y)``` If you implement a function to calculate P(t), using the formulas above, each value of t will yield a point P(t) somewhere on this line. For t==0 you will find that P(0)==A, and for t==1 you will find that P(1)==B. Of course, you have to be careful with these calculations when dealing with pixel coordinates: you have to convert these coordinates to float values first, or else the rounding effects may lead to some unexpected results.
 Re: Equation for a straight line Cyclone_S17-Jun-11 15:13 Cyclone_S 17-Jun-11 15:13
 Why is there no cfind() in the std containers? Craig Longman14-Jun-11 12:15 Craig Longman 14-Jun-11 12:15
 Re: Why is there no cfind() in the std containers? Stefan_Lang15-Jun-11 23:19 Stefan_Lang 15-Jun-11 23:19
 Re: Why is there no cfind() in the std containers? Craig Longman20-Jun-11 12:59 Craig Longman 20-Jun-11 12:59
 [SOLVED]CWebBrowser2 not getting displayed on a dialog in a dll. [modified] chandu00414-Jun-11 11:26 chandu004 14-Jun-11 11:26
 Re: CWebBrowser2 not getting displayed on a dialog in a dll. chandu00414-Jun-11 12:19 chandu004 14-Jun-11 12:19
 Re: CWebBrowser2 not getting displayed on a dialog in a dll. pix_programmer14-Jun-11 21:08 pix_programmer 14-Jun-11 21:08
 [SOLUTION] chandu00417-Jun-11 11:19 chandu004 17-Jun-11 11:19
 convert short to Cstring... spalanivel14-Jun-11 2:27 spalanivel 14-Jun-11 2:27
 Re: convert short to Cstring... వేంకటనారాయణ(venkatmakam)14-Jun-11 2:37 వేంకటనారాయణ(venkatmakam) 14-Jun-11 2:37
 Re: convert short to Cstring... Albert Holguin14-Jun-11 3:29 Albert Holguin 14-Jun-11 3:29
 Re: convert short to Cstring... Richard MacCutchan14-Jun-11 2:41 Richard MacCutchan 14-Jun-11 2:41
 Re: convert short to Cstring... Cool_Dev15-Jun-11 3:45 Cool_Dev 15-Jun-11 3:45
 [SOLVED] Problem with adding set of strings from registry to combobox [modified] Gaurav Paul14-Jun-11 0:45 Gaurav Paul 14-Jun-11 0:45
 Re: Problem with adding set of strings from registry to combobox Niklas L14-Jun-11 1:23 Niklas L 14-Jun-11 1:23
 Re: Problem with adding set of strings from registry to combobox Gaurav Paul14-Jun-11 2:00 Gaurav Paul 14-Jun-11 2:00
 Re: Problem with adding set of strings from registry to combobox Richard MacCutchan14-Jun-11 2:39 Richard MacCutchan 14-Jun-11 2:39
 Last Visit: 31-Dec-99 18:00     Last Update: 12-Apr-24 8:01 Refresh ᐊ Prev1...1279128012811282128312841285128612871288 Next ᐅ