Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zefoo

Pages: [1] 2 3 4 5 6 ... 34
1
Off Topic / Issue rotating a point about an arbitrary axis.
« on: June 23, 2014, 06:55:35 PM »
So I have written this C++ program with SDL 2.0 and I'm trying to get it to display a point rotating about the arbitrary axis 1,1,1 much like this http://twist-and-shout.appspot.com/#0_0_0_1_1_1_1_1_0_45 but it is coming out with something completely different.

code:
http://pastebin.com/uqMxKEvJ

See any errors I have made?

2
I'm not sure. I really haven't messed around with touchpads in Linux much; all I know is that if you have the proper driver it should work.

You don't have one of those switches that shuts off the touchpad, right? Unlikely, but if you do, check it.

I do but they do not work. FN-F5

3
Drivers. If they don't exist, they don't exist. However, Ubuntu has pretty good support, so they should be available... Somewhere. You just have to find them. :/

I have the synaptic drivers if that is what you are talking about?

4
I have a Toshiba Satellite P75-A7200 that I have just installed Ubuntu 14.04 on and it runs great. But the touchpad does not work. I plugged in a usb mouse and it worked fine but the laptop touchpad wont work. I tried everything I could find under the sun and it is detected and all and says its enabled but does not work. I have pressed fn f7 to enable the mouse and still nothing. Synaptics is installed im pretty sure to because I used synaptics --list or something like that and It worked fine. How can I fix it?

5
Games / Like DarkRP? Like Gmod?
« on: May 26, 2014, 09:24:10 PM »
Then why not join my darkrp server!
Its called Zefoo's DarkRP Server or the IP is just 76.25.34.149!

6
Off Topic / C++ 3D Rotation Help Needed.
« on: April 23, 2014, 11:42:13 AM »
How does one rotate a point in 3D space without gimbal lock?

All I have encountered is to use Quaternions so here is what I have tried.

Code: [Select]
#include <iostream>
#include <GLFW/glfw3.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>

#define PI 3.14159265

double getTime() {
return glfwGetTime();
}
float lastTime = glfwGetTime();
float getDelta() {
float time = getTime();
float delta = (time - lastTime);
lastTime = getTime();
return delta;
}

struct vector3f{
float x,y,z;
};
struct quaternion{
float x,y,z,w;
};
float getqlength(quaternion q1) {
return sqrt(q1.x*q1.x+q1.y*q1.y+q1.z*q1.z+q1.w*q1.w);
}
quaternion normalizeq(quaternion q1) {
quaternion nq;

float q1length = getqlength(q1);

nq.x = q1.x / q1length;
nq.y = q1.y / q1length;
nq.z = q1.z / q1length;
nq.w = q1.w / q1length;

return nq;
}
quaternion conjugateq(quaternion q1) {
quaternion nq;
nq.x = -q1.x;
nq.y = -q1.y;
nq.z = -q1.z;
nq.w = q1.w;
return nq;
}
quaternion mulq(quaternion q1, quaternion q2) {
quaternion nq;
nq.w = q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z;
nq.w = q1.x * q2.w + q1.w * q2.x + q1.y * q2.z - q1.z * q2.y;
nq.w = q1.y * q2.w + q1.w * q2.y + q1.z * q2.x - q1.x * q2.z;
nq.w = q1.z * q2.w + q1.w * q2.z + q1.x * q2.y - q1.y * q2.x;
return nq;
}
quaternion mulqv(quaternion q1, vector3f v) {
quaternion nq;
nq.w = -q1.x * v.x - q1.y * v.y - q1.z * v.z;
nq.w = q1.w * v.x + q1.y * v.z - q1.z * v.y;
nq.w = q1.w * v.y + q1.z * v.x - q1.x * v.z;
nq.w = q1.w * v.z + q1.x * v.y - q1.y * v.x;
return nq;
}
vector3f rotatev(vector3f v, vector3f axis, float angle) {
vector3f nv;

float sha = sin( (angle / 2)*(PI / 180));
float cha = cos( (angle / 2)*(PI / 180));


quaternion rotation;
rotation.x = axis.x * sha;
rotation.y = axis.y * sha;
rotation.z = axis.z * sha;
rotation.w = cha;
quaternion w = mulq(mulqv(rotation,v),conjugateq(rotation));

std::cout << w.x << "," << w.y << "," << w.z << " " << angle << " " << sha << " " << cha << "\n";

nv.x = w.x;
nv.y = w.y;
nv.z = w.z;
return nv;
}

vector3f p1;
vector3f p2;
vector3f pa;
float pang;

void init() {
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glFrontFace(GL_CCW);
glCullFace(GL_BACK);
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
p1.x = 0.0;
p1.y = 0.0;
p1.z = 0.0;
p2.x = 0.0;
p2.y = 0.2;
p2.z = 0.0;
pa.x = 0.0;
pa.y = 0.0;
pa.z = 1.0;
pang = 0;
}

void update(float delta) {
pang += 90 * delta;
if(pang > 360) {
pang -= 360;
}
p2 = rotatev(p2,pa,pang);
}

void render() {
glBegin(GL_POINTS);
glColor3f(0.0, 1.0, 0.0);
glVertex3f(p1.x, p1.y, p1.z);
glVertex3f(p2.x, p2.y, p2.z);
glEnd();
}

static void error_callback(int error, const char* description) {
    fputs(description, stderr);
}
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {
    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
        glfwSetWindowShouldClose(window, GL_TRUE);
}
int main(void) {
    GLFWwindow* window;
    glfwSetErrorCallback(error_callback);
    if (!glfwInit())
        exit(EXIT_FAILURE);
    window = glfwCreateWindow(640, 480, "", NULL, NULL);
    if (!window)
    {
        glfwTerminate();
        exit(EXIT_FAILURE);
    }
    glfwMakeContextCurrent(window);
    glfwSetKeyCallback(window, key_callback);
init();
    while (!glfwWindowShouldClose(window))
    {
        float ratio;
        int width, height;
        glfwGetFramebufferSize(window, &width, &height);
        ratio = width / (float) height;
        glViewport(0, 0, width, height);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();
        glOrtho(-ratio, ratio, -1.f, 1.f, 1.f, -1.f);
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();


update(getDelta());
render();

        glfwSwapBuffers(window);
        glfwPollEvents();
    }
    glfwDestroyWindow(window);
    glfwTerminate();
    exit(EXIT_SUCCESS);
}
So to my understanding that should give me a window with two points, one rotating around the other.

But, all i'm getting is one dot and the location of another point at 4.61497e+033,1.26933e-038,3.76462e-039 apparently...

What have I done wrong and/or how do I manage 3D rotation?

7
Creativity / Re: FTDI and Arduino help needed
« on: January 31, 2014, 08:42:17 AM »
You weren't very specific with the things you have tried, so I don't know if you have tried the things mentioned here:
http://stackoverflow.com/questions/19067287/freeduino-v0-1-avrdude-stk500-getsync-not-in-sync-resp-0x00

It's not for the Mintduino, but it's for a board using the same microprocessor that I assume you used based on the tutorial you linked.
I have tried flipping pins on the rx and tx lines,
I have tried different programmers and boards (arduino IDE), (currently AVRisp),
I have tried resinstalling different drivers.

I have been working on it for a day now so i think i tried some other stuff to but im not sure what.

http://pastebin.com/raw.php?i=1chs1eFH

8
Creativity / FTDI and Arduino help needed
« on: January 31, 2014, 08:18:42 AM »
Made a Mintduino (http://makezine.com/projects/build-a-mintronics-mintduino/), plugged the FTDI into the board, Plugged the FTDI into the computer (usb), attempted to upload a sketch, tx LED blinks 3 times, Arduino IDE error (avrdude) “avrdude: stk500_getsync(): not in sync: resp=0x00”

im using a https://www.sparkfun.com/products/10524 for my processor
Tried everything it seems. Please help.

console output

http://pastebin.com/raw.php?i=1chs1eFH

9
Off Topic / nvm
« on: December 15, 2013, 06:19:35 PM »

nvm

10
Games / Zefoo's DarkRP server!
« on: October 16, 2013, 03:15:19 PM »
Fixed up with drugs, chairs, vehicles, dealers, and loads of other stuff! The ip is 75.71.195.86 and we would love to populate our city!

11
Off Topic / Do you know much about Ubuntu Server?
« on: October 15, 2013, 11:53:17 AM »
Then I would appreciate your help with this.

Quote
So I have a system of mine running Ubuntu server and I Installed steamcmd on it. Then I tried to run it and got this.

Code: [Select]
sudo ./steamcmd.sh
main.cpp (316)  : Assertion Failed: Couldn't chdir into the install path

Anyone know how to fix this?

12
Run as super user.  Use "sudo" before the command.

Already did. Sorry I forgot to put that in there.

13
So I have a system of mine running Ubuntu server and I Installed steamcmd on it. Then I tried to run it and got this.

Code: [Select]
sudo ./steamcmd.sh
main.cpp (316)  : Assertion Failed: Couldn't chdir into the install path

Anyone know how to fix this?

14
Games / Gmod Darkrp Server
« on: August 07, 2013, 11:32:23 PM »
76.25.34.149 is the ip if you would like to join.

15
Games / Vanilla Minecraft Server!
« on: July 27, 2013, 01:04:20 PM »
Its just a vanilla Minecraft 1.6.2 server. The IP is 76.25.34.149 and the port is the standard 25565. Its Just standard survival.

But
NO GRIEFING OR YOU WILL BE BANNED FOR LIFE!

So join, tell your friends, tell their friends, tell their friends friends.

Pages: [1] 2 3 4 5 6 ... 34