The Official Happiness Thread

Post Reply
User avatar
DoorM4n
Posts: 2154
Joined: Sun Dec 09, 2007 3:01 am
Location: Houston

Re: The Official Happiness Thread

Post by DoorM4n »

I was driving around Austin running an errand for my boss and I drove by the Rooster Teeth headquarters and passed out some fliers for an event we are holding. I met Barbara from RoosterTeeth and some of their camera guys. She is damn fine in person!!
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: The Official Happiness Thread

Post by XZodia »

Cool, what's the event?
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
DoorM4n
Posts: 2154
Joined: Sun Dec 09, 2007 3:01 am
Location: Houston

Re: The Official Happiness Thread

Post by DoorM4n »

it's a concert that the legislative caucus I am hired through is hosting, and they are hosting a famous mexican musician. I gave the rooster teeth pepes the fliers cause I wanted an excuse to interrupt them, haha. I just drove by really fast with my friend and said "hey, we're hosting an event at the capitol, yall should come. Btw, I was really big fans of yall back in high school, and Im glad to see yall in Austin. pass those fliers around!" haha, it was a spur of the moment drive by, but it was nonetheless pretty cool to meet the pepes there.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: The Official Happiness Thread

Post by XZodia »

I got a 3DS XL! =)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: The Official Happiness Thread

Post by troymac1ure »

Been spending my spare time over here and enjoying the challenges:
http://www.hackthis.co.uk/index.php
User avatar
Ogrish
Posts: 1512
Joined: Wed Dec 12, 2007 2:56 am

Re: The Official Happiness Thread

Post by Ogrish »

well i lost my house but, im staying with my bro, and im back online. 8)
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: The Official Happiness Thread

Post by XZodia »

troymac1ure wrote:Been spending my spare time over here and enjoying the challenges:
http://www.hackthis.co.uk/index.php
Thanks troy, that site is addictive >_>
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: The Official Happiness Thread

Post by Click16 »

XZodia wrote:I got a 3DS XL! =)
What is 3ds xl?
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: The Official Happiness Thread

Post by XZodia »

Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: The Official Happiness Thread

Post by Click16 »

Oh lol! I thought you meant some sort of 3d modeling program! Haha OK. Yeah, I never had a DS. I only played handheld because of Pokemon. I think the GBA had the BEST pokemon games. Everything after it wasn't very good. (Only exception being the remakes of Silver and Gold.)
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: The Official Happiness Thread

Post by troymac1ure »

XZodia wrote:
troymac1ure wrote:Been spending my spare time over here and enjoying the challenges:
http://www.hackthis.co.uk/index.php
Thanks troy, that site is addictive >_>
You're getting there! I still need one more Basic X code.
It's a pretty cool site & I've learned a lot of new things just from doing the levels.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: The Official Happiness Thread

Post by OwnZ joO »

The metasploit framework can be fun to play with too. For one of my school projects we used it to set up a java exploit, but it was cool to see everything else you could easily set up with it.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: The Official Happiness Thread

Post by Grimdoomer »

Best semester, of my life. I only wish next semester would be as good as this one.
Don't snort the magic, we need it for the network.
User avatar
DoorM4n
Posts: 2154
Joined: Sun Dec 09, 2007 3:01 am
Location: Houston

Re: The Official Happiness Thread

Post by DoorM4n »

Going to law schooooooool!
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: The Official Happiness Thread

Post by JacksonCougar »

Projected a screen-coordinate onto a line then into a world coordinate: a month well spent. Now to figure out how to handle the undefined slope of a line in the code, and the projection to a ray instead of a plane.

Code: Select all

void Mouse_Move(object sender, OpenTK.Input.MouseMoveEventArgs e)
        {
            // if we are in 'drag-mode'
            if (DragMode)
            {
                //  store the mouse delta
                //var delta = Point.Subtract(e.Position, (Size)last_mouse);

                //  return the mouse to the previous position
                if (reset_mouse)
                {
                    Cursor.Position = last_mouse;
                    reset_mouse = false;
                    return;
                }
                RotateCamera(e.XDelta, e.YDelta);
                reset_mouse = true;


            }

            /* * *
             * Screen-based, Axis-restricted movement:
             * 
             * Project the origin of the coordinate system and the axis vector into screen-space as two points
             * Use those two points to get the equation of the line ax + b = y,
             * Get the mouse start point and end point and project both onto the line,
             * Project both those points back into world-coordinates... ?
             * * */
            var client_point = e.Position;
            var origin_point = new Vector3(client_point.X, client_point.Y, 0);
            var delta_point = new Vector3(client_point.X - e.XDelta, client_point.Y - e.YDelta, 0);

            var world_origin_coordinate = camera.UnProject(origin_point);
            var world_delta_coordinate = camera.UnProject(delta_point);


            var axis_origin = camera.Project(new Vector4(0, 0, 0, 1));
            var axis_normal = camera.Project(new Vector4(1, 0, 0, 1));


            axis_origin.Z = 0;
            axis_normal.Z = 0;

            // y = mx + b
            // b = y - mx

            var m = (axis_normal.Y - axis_origin.Y) / (axis_normal.X - axis_origin.X);
            var b = axis_normal.Y - (m * axis_normal.X);
            var y1 = m * 0 + b;
            var y2 = m * 640 + b;

            var x0 = 0.0f;
            var x1 = 640.0f;

            var A = -(axis_normal.Y - axis_origin.Y);
            var B = (axis_normal.X - axis_origin.X);
            var C = (A * axis_origin.X) + (B * axis_origin.Y);

            var yint = C / A;
            var xint = C / B;



            //var client_point = PointToClient(last_mouse);
            var inverse_m = -1 / m;

            var aspect_ration = (float)camera.ViewportWidth / (float)camera.ViewportHeight;
            //inverse_m *= aspect_ration;
            var b2 = origin_point.Y - (inverse_m * origin_point.X);
            var b3 = delta_point.Y - (inverse_m * delta_point.X);
            // inverse_m(x) + b = mx + b
            // y = ;

            var x_intercept = (b - b2) / (inverse_m - m);
            var y_intercept = m * x_intercept + b;

            var delta_x_intercept = (b - b3) / (inverse_m - m);
            var delta_y_intercept = m * delta_x_intercept + b;

            if (B == 0)
            {
                y1 = 0;
                y2 = 480;
                x0 = x1 = C / A;
                x_intercept = C / A;
                y_intercept = origin_point.Y;

                delta_x_intercept = C / A;
                delta_y_intercept = delta_point.Y;
            }
            if (A == 0)
            {
                x_intercept = origin_point.X;
                y_intercept = C / B;
                delta_x_intercept = delta_point.X;
                delta_y_intercept = C / B;
            }

            var axis_line_origin = camera.UnProject(new Vector3(x0, y1, 0));
            var axis_line_end = camera.UnProject(new Vector3(x1, y2, 0));


            var intercept_origin = camera.UnProject(new Vector3(origin_point.X, origin_point.Y, 0));
            
            var intercept_delta = camera.UnProject(new Vector3(delta_x_intercept, delta_y_intercept, 0));
            var intercept_point = camera.UnProject(new Vector3(x_intercept, y_intercept, 0));

            GL.LineWidth(3.0f);
            GL.Begin(BeginMode.Lines);
            GL.Color3(Color.Black);
            GL.Vertex3(axis_line_origin.Xyz);
            GL.Vertex3(axis_line_end.Xyz);
            GL.Color3(Color.Red);
            GL.Vertex3(intercept_origin.Xyz);
            GL.Vertex3(intercept_point.Xyz);
            GL.Color3(Color.Blue);
            GL.Vertex3(world_delta_coordinate.Xyz);
            GL.Vertex3(intercept_delta.Xyz);
            GL.End();

            GL.LineWidth(1.0f);




            var near0 = UnProject(ref camera.ProjectionMatrix, camera.ViewMatrix, camera.Viewport, new Vector3(x_intercept, y_intercept, 0.0f));
            var far0 = UnProject(ref camera.ProjectionMatrix, camera.ViewMatrix, camera.Viewport, new Vector3(x_intercept, y_intercept, 1.0f)).Xyz;
            //var origin = UnProject(ref camera.ProjectionMatrix, camera.ViewMatrix, camera.Viewport, new Vector3(0, 0, 0.5f));
            far0.Normalize();
            Ray r0 = new Ray() { Origin = near0.Xyz, Direction = far0 };

            var near1 = UnProject(ref camera.ProjectionMatrix, camera.ViewMatrix, camera.Viewport, new Vector3(delta_x_intercept, delta_y_intercept, 0.0f));
            var far1 = UnProject(ref camera.ProjectionMatrix, camera.ViewMatrix, camera.Viewport, new Vector3(delta_x_intercept, delta_y_intercept, 1.0f)).Xyz;
            //var origin = UnProject(ref camera.ProjectionMatrix, camera.ViewMatrix, camera.Viewport, new Vector3(0, 0, 0.5f));
            far1.Normalize();
            Ray r1 = new Ray() { Origin = near1.Xyz, Direction = far1 };
            float? distance0, distance1;

            var plane_normal = camera.Position;
            plane_normal.Normalize();

            var b0 = r0.Intersects(new Plane() { Distance = 0, Normal = new Vector3(0, 1, 0) }, out distance0);
            var b1 = r1.Intersects(new Plane() { Distance = 0, Normal = new Vector3(0, 1, 0) }, out distance1);

            if ((distance0.HasValue && distance1.HasValue) && (float.IsNaN(distance0.Value) || float.IsNaN(distance1.Value)))
            {
                b0 = r0.Intersects(new Plane() { Distance = 0, Normal = new Vector3(0, 0, 1) }, out distance0);
                b1 = r1.Intersects(new Plane() { Distance = 0, Normal = new Vector3(0, 0, 1) }, out distance1);
            }
            
            if (distance0.HasValue)
            {
                ray_intersection_point = r0.Origin + r0.Direction * distance0.Value;
                //ray_intersection_point.X /= ray_intersection_point.

                var origin_ray = r1.Origin + r1.Direction * distance1.Value;
                var d_v = ray_intersection_point - origin_ray;
                Translation_Gimbal.Translate((d_v), camera);
            }
           

            // endif 'drag-mode'
        }

        /* * *
         * Translation Gimbal Movement
         * 
         * Plan: project the axis of movement into screen coordinates,
         * then calculate the equation of that line. 
         * Next project a line from the mouse position to the line to 
         * determine where the mouse movement would move the point along the line.
         * Finally project back into world space and move the gimbal to the new point?
         * * */
Coding like a champ again. I need to take a linear algebra course lawl.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: The Official Happiness Thread

Post by XZodia »

I see your trying to Unproject a screen coordinate to a ray into the scene
This might help: https://www.google.co.uk/search?q=unpro ... oordinates
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: The Official Happiness Thread

Post by JacksonCougar »

Simply trying to make a 3ds max transformation gizmo clone. Having difficulties still.
User avatar
Zaid
Posts: 250
Joined: Sun Jan 09, 2011 2:07 am

Re: The Official Happiness Thread

Post by Zaid »

JacksonCougar wrote:
Grimdoomer wrote:Almost had a girlfriend, almost.
relevant
That made me laugh a lot. Just saying.
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: The Official Happiness Thread

Post by CaptainPoopface »

DoorM4n wrote:Going to law schooooooool!
Hmmmm... I wouldn't recommend it. I considered law school, even took the LSAT and got a decent score. It was the hardest test I've ever taken, and definitely will make you smarter when you prepare for it. But you see one story after another about disillusioned law school grads who come out owing 6 figures and get some $35K salary doing hideously boring contract analysis (called being a "coder" in the legal profession) or legwork for real attorneys. Too much supply, not enough demand, unless you're really good at it. Think hard!
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: The Official Happiness Thread

Post by OwnZ joO »

CaptainPoopface wrote:
DoorM4n wrote:Going to law schooooooool!
Hmmmm... I wouldn't recommend it. I considered law school, even took the LSAT and got a decent score. It was the hardest test I've ever taken, and definitely will make you smarter when you prepare for it. But you see one story after another about disillusioned law school grads who come out owing 6 figures and get some $35K salary doing hideously boring contract analysis (called being a "coder" in the legal profession) or legwork for real attorneys. Too much supply, not enough demand, unless you're really good at it. Think hard!
I have also heard that there is an overpopulation of lawyers at the moment. Good luck if you follow through with it though!
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: The Official Happiness Thread

Post by JacksonCougar »

Fuck yea: dot product is useful.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: The Official Happiness Thread

Post by XZodia »

Projecting a line onto another line mb?
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: The Official Happiness Thread

Post by JacksonCougar »

Yea! Lines man.
Image
That was a lot more work than I thought it would be.

Image
now for rotations... :hmm2:
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: The Official Happiness Thread

Post by neodos »

:O awesome stuff Jackson!
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: The Official Happiness Thread

Post by Click16 »

That's pretty freaking cool man. Keep up the good work!
Post Reply