Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


jouley

Member Since 05 Apr 2006
Offline Last Active Oct 29 2012 07:58 PM

Topics I've Started

What should I do in Amsterdam?

01 October 2010 - 04:21 AM

I'm being sent to Amsterdam on a study-related endeavor, and came up with one free day on the front end (this Sunday) and a day and a half on the back end (Wednesday/Thursday) of an obligation. What should I do with my free time there? A friend in Eindhoven is coming up on Sunday to show me around, but I'll be on my own for Wednesday and Thursday with an early flight out on Friday.

What I already have on the list:
- Museums
- Boat ride (included in the study-related obligation)

What I'm NOT interested in:
- Clubbing
- The Red Light district

What I AM interested in:
- Things other than the RLD that make Amsterdam Amsterdam
- Nice beers
- Nice foods
- A day trip to a neighboring town?

So, how about it - what should I plan? Locals? Past visitors?

How does this heatsink come off?

01 July 2010 - 01:58 PM

I have an old P4 machine that I'm trying to breathe new life into with a cheap motherboard/gpu upgrade. I've taken it all apart, but can't figure out how to get the old heatsink off so I can move it and the CPU over to the new motherboard. Pushing here, pulling there, even a gentle twist - nothing. Google's been nearly useless - every P4 heatsink guide I find has simple-looking clasps, nothing pictured is like this thing. Has anyone seen this before?



More views: http://img21.imageshack.us/gal.php?g=p4heatsink004.jpg

Distance from point to cone

20 November 2007 - 09:14 AM

I'm having a bit of trouble finding the shortest distance from a 3D point to the surface of an infinite cone defined by an apex, interior semi-angle, and opening axis. I have what I believe to be the solution for a double cone (one opening from either side of the apex), but can't quite wrap my head around how to restrict it to a single cone. Here's pseudocode for what I have thus far:
double Angle;  // radians
double Apex[3];
double Axis[3];
double Point[3];

//	send to origin
Point[0] -= Apex[0];
Point[1] -= Apex[1];
Point[2] -= Apex[2];
Apex[0] = 0.0;
Apex[1] = 0.0;
Apex[2] = 0.0;

//	get another point on the axis of the cone
double Point2[3] = { Apex[0] + Axis[0], Apex[1] + Axis[1], Apex[2] + Axis[2] };

//	get the vector from the second point to the given point
double V[3] = { Point[0] - Point2[0], Point[1] - Point2[1], Point[2] - Point2[2] };
	
//	find the distance from the cone's axis to the point
double Crossed[3] = CrossProduct(Axis, V);
double CrossedMagnitude = Magnitude(Crossed);
double AxisMagnitude = Magnitude(Axis);
double d = CrossedMagnitude / AxisMagnitude;

//	find orthogonal distance of point down axis via pythagoras
double V2[3] = { Apex[0] - Point[0], Apex[1] - Point[1], Apex[2] - Point[2] };
double p = sqrt((V2[0] * V2[0] + V2[1] * V2[1] + V2[2] * V2[2]) - (d * d));

//	we've reduced the problem to 2D trig
Distance = d * cos(Angle) - p * sin(Angle);
I feel confident that it works, because when I test it with a point cloud generated from a cone model, every point returns 0 +- 0.001. When I test with a point one unit above and below the apex, though, it gives me the same result, when one unit above the apex should give 1. This last fact led me to the conclusion that it's only working for double cones. What am I missing? -jouley

Variable precision libraries too precise

17 September 2007 - 05:33 AM

I'm doing some work with a GPU simulator, and I'm trying to see what effects variable precision floating point operations will have. "Simple!" I say to myself, "I'll just toss in a variable-precision library into the math, limit it to however many bits I want, and compare the output to the full-precision sims." After some looking, I decided to give The GMP Library a try. However, unless I'm missing something, there's a minimum size enforced, for doubles, anyway. Following the instructions found here, I threw this together:
mpf_t A;
mpf_init2(A,32);
mpf_set_d(A,0.0);
unsigned int uiPrec = mpf_get_prec(A);
if (uiPrec != 32)
	printf("Precision of A is %d\n", uiPrec);

It breaks, telling me the precision is actually 64. Changing the 32 to 128 works like a charm, though, which makes me think that I'm doing things correctly. So, a twofold query: 1) Has anyone had any experience with GMP? Am I, in fact, doing it right? 2) Does anyone know of any library that can do what I want (change the precision to lower than normal, where truncation and rounding will certainly come into play. My needs don't involve dealing with very big or very small numbers, just regular type.)? Thanks for the help! [Edit: Not to bump this back up to the top of anything, more to follow up for posterity: it's tricky to decide which bits to chop (the fraction bits will lose you some precision, and the exponent bits could be either precision (lsb, which wouldn't really make much sense) or range (msb). Chopping bits statically ("I want this number to have x exponent bits and y mantissa bits") means that hopefully the numbers won't go outside of the range expressible with x; if it does, it'll be infinity, so it'd be simpler just to clamp to infinity. Chopping bits dynamically ("I want a number with x bits, you decide how to split 'em up") is also a bit [heh] dicey. In the end, I couldn't find any code for CMUFloat, a library that seems to do exactly what I need, so I cobbled together my own. All it does right now is mask off mantissa bits, there's no fancy rounding or special case handling like the standard requires, but it sure does make my numbers (and pictures) ugly, so all's well!] [Edited by - jouley on October 2, 2007 2:27:26 PM]

Malformed links unnoticed in preview

04 January 2007 - 07:07 PM

The < a href > tag is a bit prejudiced towards the post's preview. It doesn't seem to care that you (I) are (am) often lacking the closing double quote on a link. E.g.: Below are two links to google, the first of which is HTMLed up correctly, the second of which lacks a closing double-quote. Despite my continued ramblings after the second link (verifiable when attempting to edit the post), the final result is nothing after the malformed tag. No such error shows up in the preview window, which is the main bug, I guess, not just that a missing quote takes out the rest of the post. That's just my fault. Link 1 (Correct): google Link 2 (Nothing will show up after this):
PARTNERS