So, my vacation is starting to come to a close. And I'm looking at what I expected from this vacation, and what I actually got.
I expected that I would, maybe not get laid, but find someone here who might be a friend who I could share attraction with. And maybe have a brief fling. I did kiss one of my friends, but it's normal for her and I to kiss. We're close, and the kissing really doesn't mean much. I kiss a few of my female friends on the cheeks when I see or leave them, this one I kiss on either the cheek or the lips. It's not a romantic kiss though, it's kind of like an italian kiss I suppose because it's more friendly than anything else. Anyway, getting off topic here aren't I? I expected to maybe cuddle with a specific friend and to admit some feelings for her. That didn't happen, because even though I saw her twice... maybe three times, it was always with a group. And since she invited people to events that we had planned on doing. I'm taking her hint that she just wants to be friends who tell each other they love each other and act like boyfriend girlfirend without the actual physical affection and only the virtual. It's just fake. I'm not a fake person, most of the time, and I don't especially enjoy fake. I do put on my smile for a good amount of the day, and I tend to shrug off my insecurities and sweep all my problems under an apathetic bed. I don't want a fake relationship, and I don't want a fake love, because after pretending for so long, it starts to feel like it might actually be something. I'm tired of that illusion. ... cough. I expected to see lots of friends and catch up on old times. That kind of happened, with one of my friends. The weird thing is, it was a friend who I am close with, but she was the only one who actually gave a damn to ask about me. Most of my conversations go something like this:
Hi, hi, how are you, and then they go on for a while, when they stop, they don't ask about me, so I further the conversation by asking them how their lives are going. And then the topic is them, them, them. I wish that for once or twice, maybe I could be the topic.
I think I'm mainly annoyed at the level of drama that occured while I was home. As noted by my previous rather depressing blogpost, my friend screwed up his relationship with his girl, and happened to do it with the girl who I was falling for. It's the reason I took a walk yesterday. Loaded the playlist I talked about onto my mp3 player and went for a walk in the crappy overcast weather. It was good, I got a good amount of thinking done. I was trying to figure out if I actually really like the girl enough to go for it, or if I'm more attracted to her as a friend. I didn't really figure too much out. But, I do think I'm attracted to her based on our common fuck ups. A'la she has baggage. Much in the same way I do. She still thinks about her big ex, and mentions him a lot. He was a big part of her life, so its no wonder a lot of things still remind her of him. And I think I like that about her, because I feel the same way about my ex from a long time ago. Everything still reminds me of her. Maybe that's why coming back home is kind of painful sometimes.
I expected more from my vacation, maybe some sunshine. I know I can't control the weather, but I've seen the sun once this entire week. It's frustrating when you want to go out and do fun things with friends, but they dont want to because the weather is shitty. It's rather annoyying and difficult.
I guess, when it comes down to it, I am looking forward to go back to VT, when I've talked to people over SMS, I've had to erase a part of a text that said: I only have x days before I go back home, multiple times, I guess I consider VT more home than this place to some extent. Maybe it's just nice to have a freshstart and not have all the people who already know you and stuff. Start new, find someone new, who hopefully wont fuck up my mind like my ex did.
Saturday, March 12, 2011
Wednesday, March 9, 2011
Turret Estimation
Workin on my program some more:
So I've come up with a bit more code, and a few more interesting problems. I think I've figured out how to use my vectors correctly. I can use velocity vectors and position vectors to estimate the locations of objects. It's great.
The problem I've come up with is how to figure out where to rotate my turret to in order to fire. Because I have a few variables I need to keep track of, and keep in mind.
1. The projectiles statistics: the bullet or shell to be fired by the turret has a velocity vector and position vector. Once I move into a 3d space I may include a mass in here. But besides that, velocity is a straight float, why? Because I don't know which x y components to give the vector because I don't know the theta. so, a straight number like 2.5 m/s or something, allows me to estimate where to shoot the bullet. This will make sense once I describe my idea for this.
2. The target objects estimated path using the pings. This gives me a velocity vector and a position vector for the target.
3. The current heading, or theta of the turret.
So, my method, is briefly describe in the picture below.
So I've come up with a bit more code, and a few more interesting problems. I think I've figured out how to use my vectors correctly. I can use velocity vectors and position vectors to estimate the locations of objects. It's great.
The problem I've come up with is how to figure out where to rotate my turret to in order to fire. Because I have a few variables I need to keep track of, and keep in mind.
1. The projectiles statistics: the bullet or shell to be fired by the turret has a velocity vector and position vector. Once I move into a 3d space I may include a mass in here. But besides that, velocity is a straight float, why? Because I don't know which x y components to give the vector because I don't know the theta. so, a straight number like 2.5 m/s or something, allows me to estimate where to shoot the bullet. This will make sense once I describe my idea for this.
2. The target objects estimated path using the pings. This gives me a velocity vector and a position vector for the target.
3. The current heading, or theta of the turret.
So, my method, is briefly describe in the picture below.
I ran atrial of it last night, and it appeared to be working, but I do need to iron out some kinks in the simulation
Thursday, March 3, 2011
Radar Tracking Turret!
I came up with a new idea to code! It will probably take up a good chunk of my nights during spring break
I simple turret that tracks and fires at objects in its pinging field, in 2d space. Once I get that working, I'll think about working in 3d space.
Here are a couple of my sketches for ideas:
ok, so the first image is how the ping system will work. The second is how the pings data will be used to determine the vector of the object being targeted. and the last is how the turret will estimate where to fire.
So this is how I plan to do it. No code yet!
Have the turret object which will hold its own cordinates in its plane, its angle of firing and a pointer to its projectile loaded.
The projectile object will have a velocity and x,y cordinates. (once I move to 3d space it will have mass and other things)
The target will have an x,y and a velocity and theta for movement.
Then there is the collections object that will store all these things. this will be used by the pings sent out by the turret to let the turret know the location of the target object.
A few of the details still need to be worked out. But I've got enough that I can start a basic console prototype
I simple turret that tracks and fires at objects in its pinging field, in 2d space. Once I get that working, I'll think about working in 3d space.
Here are a couple of my sketches for ideas:
ok, so the first image is how the ping system will work. The second is how the pings data will be used to determine the vector of the object being targeted. and the last is how the turret will estimate where to fire.
So this is how I plan to do it. No code yet!
Have the turret object which will hold its own cordinates in its plane, its angle of firing and a pointer to its projectile loaded.
The projectile object will have a velocity and x,y cordinates. (once I move to 3d space it will have mass and other things)
The target will have an x,y and a velocity and theta for movement.
Then there is the collections object that will store all these things. this will be used by the pings sent out by the turret to let the turret know the location of the target object.
A few of the details still need to be worked out. But I've got enough that I can start a basic console prototype
Wednesday, March 2, 2011
OCaml Pattern Matching and etc.
I've a midterm tomorrow, in 3 classes. Anyway, calculus isn't hard. German will be alright. But programming languages, not that it will be hard, but just.... Ok so, we're allowed to use our notes we've taken in class as well as the daily summaries that he has given us in the past. Unfortunately, I've been taking all my notes in LaTeX on my computer. Which means I need to print them. Which means I need a printer, which means I needed to get my roommate to print it out. Which means I went and did something fun and asked him to do it. I came back a while later, and bam. Thirty Five Pages. THIRTY FIVE BLOODY PAGES of notes. Granted that's for the entire first half of this semester. But... It's computer paper! Formatted! To what looks like 10 size font. That's a lot of characters. Plenty of bits.
Anyway, besides that, I've just completed programming a reverse polish notation calculator in OCaml. The powers of pattern matching are spectacular. For anyone who has never programmed in Objective OCaml, I'd recommend attempting to. The type system is very nice, even if trying to figure out your error messages is a pain in the ass. I normally love my C++ but I do enjoy OCaml's elegance factor.
This semester seems like it's been quite a jump in what I've learned as far as CS goes. Before this semester I had no idea how to use php, javascript, server side includes, ocaml, unix file commands, batch file commands, and some directX code. Its a trend I would like to keep, this upward mobility of my learning. I like.
Anyway, besides that, I've just completed programming a reverse polish notation calculator in OCaml. The powers of pattern matching are spectacular. For anyone who has never programmed in Objective OCaml, I'd recommend attempting to. The type system is very nice, even if trying to figure out your error messages is a pain in the ass. I normally love my C++ but I do enjoy OCaml's elegance factor.
This semester seems like it's been quite a jump in what I've learned as far as CS goes. Before this semester I had no idea how to use php, javascript, server side includes, ocaml, unix file commands, batch file commands, and some directX code. Its a trend I would like to keep, this upward mobility of my learning. I like.
Wednesday, February 16, 2011
Binary Heap! splaying of emotions
So I've come to realize, after my data structures class today. That the method of modelling a Binary Tree with an Array that I was doing was in all actuality, a binary heap. Granted I came up with the methods of index access and such a week into my class when I didn't even know what a binary heap was, but still, I was on the right road. It's awesome. I'm decently happy with myself that I actually fundamentally understood and created a structure that was conceived of by brilliant minds who've come before me. And in fact, maybe even be alive today. It fills me with excitement for the future possibilities of my life.
Also, after discussing splay trees and studying their runtime and structure. I've determined that if someone would try to model the human emotion. They would use a splay tree. Because emotions that are accessed often, are often accessed again. For example, if someone is angry. Even if you cheer them up and calm them down, we all know it doesn't take much more to set them off again. And a person in a happy mood will be hard to get out of easily.
Another idea I had today was to write a python program that would export a picture of a binary tree. Using the height of the tree as it's measure, it would create a picture that would scale the tree so that it would fit neatly onto the picture. I've already a few ideas on how to do this. The cool thing I think, would be to have it read from a text file, specified to be in a specific traversal order, and then export the picture. Or perhaps even read from the text file and organize the data itself?
All these ideas, and so little time to actually implement them.
Oh! Also, my sister visited me and brought me a very nice 88 key keyboard. Using this I've begun learning Mandy by Barry Manilow. I'm 16 or so measure in now, 10-12 or which I can play quite comfortably. I do love making music!
The other day I started messing around with my webcam. Specifically on Video Feedback. Aka, pointing the webcam at it's output on the computer screen. Creating an infinite loop of awesome. I created a couple videos as well. There were some really cool effects.
Also, after discussing splay trees and studying their runtime and structure. I've determined that if someone would try to model the human emotion. They would use a splay tree. Because emotions that are accessed often, are often accessed again. For example, if someone is angry. Even if you cheer them up and calm them down, we all know it doesn't take much more to set them off again. And a person in a happy mood will be hard to get out of easily.
Another idea I had today was to write a python program that would export a picture of a binary tree. Using the height of the tree as it's measure, it would create a picture that would scale the tree so that it would fit neatly onto the picture. I've already a few ideas on how to do this. The cool thing I think, would be to have it read from a text file, specified to be in a specific traversal order, and then export the picture. Or perhaps even read from the text file and organize the data itself?
All these ideas, and so little time to actually implement them.
Oh! Also, my sister visited me and brought me a very nice 88 key keyboard. Using this I've begun learning Mandy by Barry Manilow. I'm 16 or so measure in now, 10-12 or which I can play quite comfortably. I do love making music!
The other day I started messing around with my webcam. Specifically on Video Feedback. Aka, pointing the webcam at it's output on the computer screen. Creating an infinite loop of awesome. I created a couple videos as well. There were some really cool effects.
Thursday, February 3, 2011
Binary Trees and Time
So, I've learned from my class, and from my own musings that to maintain a self balancing tree, you need to do rotations. When I was brainstorming on my whiteboard I knew what I'd want to be doing, but after learning about zig-zig, zig-zag and the variations of (there are only 4 in an AVL tree) I feel like I would have arrived at such a conclusion after another week or so of pondering.
It would have taken only a matter of days or maybe hours had I been able to actually have some time to really think about this stuff. But my schedule this semester sucks, I've got way too much/little time in between classes. And while I do my homework between classes, I almost always have to immediately go to another class before I can start anything new, or explore my brain a little bit. Once my classes are over, I have about an hour or so before I need to go to bed so I can wake up for an 8:30 class. You'd think weekends would be better? But I need money, so I work. Which is really nice, you know money and all. Except for the fact that the check from the company is overdue by a week at the moment. And I'd love to know why, because if I'm not getting paid, then my time is wasted and there are many things I need to do with my time.
Ugh, I hate not having time and feeling pressed for time like this at the time. Especially after a semester of a very very nice semester.
I've started working on the Latimer-Zerachiel System again, and I've gotten the chat boxes talking to each other, but for some reason they're not executing the commands. The problems more than that, but my time is pressed so I gotta stop writing. Ugh.
It would have taken only a matter of days or maybe hours had I been able to actually have some time to really think about this stuff. But my schedule this semester sucks, I've got way too much/little time in between classes. And while I do my homework between classes, I almost always have to immediately go to another class before I can start anything new, or explore my brain a little bit. Once my classes are over, I have about an hour or so before I need to go to bed so I can wake up for an 8:30 class. You'd think weekends would be better? But I need money, so I work. Which is really nice, you know money and all. Except for the fact that the check from the company is overdue by a week at the moment. And I'd love to know why, because if I'm not getting paid, then my time is wasted and there are many things I need to do with my time.
Ugh, I hate not having time and feeling pressed for time like this at the time. Especially after a semester of a very very nice semester.
I've started working on the Latimer-Zerachiel System again, and I've gotten the chat boxes talking to each other, but for some reason they're not executing the commands. The problems more than that, but my time is pressed so I gotta stop writing. Ugh.
Monday, January 31, 2011
Binary Trees Revisited
In a previous post, I said that my array-ed BT would only work on a balanced tree. I realize now this is false. It works on any type of tree, there just needs to be checking to make sure a 'node' exists there first.
Also, I've been thinking about how to make a binary tree balance itself. I know that there are probably plenty of data structures and other things already in existence, but why ruin the fun when I can just think about it first?
So this is how I think it would work:
In the case of a completely skewed tree, you grab the 'middle' node, then from there, you assign that as the root. from the nodes that were higher than that node, you grab the middle of that, and from the lower nodes, the middle of that, those are it's right and left nodes respectively.
In other words, recursively grab the middle of the tree. If you had this:
5
6 this is the left of the middle node
7
8 this is the middle node.
9
10 this is the right of the middle node
11
can you picture it? It's not too hard to code either. The matter is, that that example was a completely skewed tree. But what about if you have a more normal tree? like:
5
2 8
1 3 9
10
I really hope that formats correctly... Anyway, OBVIOUSLY you grab the 9 and throw it where the 8 is and you get a perfectly balanced tree. But what exactly is the thought process?
As a matter of fact, it's the same thing we were doing before, just part of our tree is already balanced, and if you take a look, our tree contains a high value of 10, half of that is 5, our root! In other thoughts, that means that if our tree already has the proper root we shouldn't bother changing it, but continue onward and examine the branches of that root. You'll notice that once again, the left sub tree of our root is balanced already, so no need to check it, but the right side is skewed. In fact, if you ignore the root and left sub tree, you'd just have the skewed tree of 8,9,10. and if you ran our algorithm on that? Well, there are 3 nodes in our tree, and it so happens, that the middle one of those is 9 and to balance our tree? We need that 9 to be the root. Tada.
Now you may have noticed a bit of... entropy creeping into my arguments for example, when we look at our middle, I've used both the value of the node, and the node themselves. So which should our algorithm take on? Obviously, the value side of this. So in that case, how do we select 9? Well, we can look at tree depth? But once again that's more of our nodes really. 10 + 8 divided by 2 gets us it, but is this just a happy coincidence?
If we look at our left tree we see it's already balanced, but what if it were like our right side? it'd go 3 2 1. The last node, and the first node added together and then divided by two? get's us 2. Which happens to be the value we need to balance! Seems nice right?
What if you don't have the right value? How do you find the closest? If two values are the same distance away, then how do you choose? I'm going to think about these more and get back to you. Maybe even with some code to show!
Also, I've been thinking about how to make a binary tree balance itself. I know that there are probably plenty of data structures and other things already in existence, but why ruin the fun when I can just think about it first?
So this is how I think it would work:
In the case of a completely skewed tree, you grab the 'middle' node, then from there, you assign that as the root. from the nodes that were higher than that node, you grab the middle of that, and from the lower nodes, the middle of that, those are it's right and left nodes respectively.
In other words, recursively grab the middle of the tree. If you had this:
5
6 this is the left of the middle node
7
8 this is the middle node.
9
10 this is the right of the middle node
11
can you picture it? It's not too hard to code either. The matter is, that that example was a completely skewed tree. But what about if you have a more normal tree? like:
5
2 8
1 3 9
10
I really hope that formats correctly... Anyway, OBVIOUSLY you grab the 9 and throw it where the 8 is and you get a perfectly balanced tree. But what exactly is the thought process?
As a matter of fact, it's the same thing we were doing before, just part of our tree is already balanced, and if you take a look, our tree contains a high value of 10, half of that is 5, our root! In other thoughts, that means that if our tree already has the proper root we shouldn't bother changing it, but continue onward and examine the branches of that root. You'll notice that once again, the left sub tree of our root is balanced already, so no need to check it, but the right side is skewed. In fact, if you ignore the root and left sub tree, you'd just have the skewed tree of 8,9,10. and if you ran our algorithm on that? Well, there are 3 nodes in our tree, and it so happens, that the middle one of those is 9 and to balance our tree? We need that 9 to be the root. Tada.
Now you may have noticed a bit of... entropy creeping into my arguments for example, when we look at our middle, I've used both the value of the node, and the node themselves. So which should our algorithm take on? Obviously, the value side of this. So in that case, how do we select 9? Well, we can look at tree depth? But once again that's more of our nodes really. 10 + 8 divided by 2 gets us it, but is this just a happy coincidence?
If we look at our left tree we see it's already balanced, but what if it were like our right side? it'd go 3 2 1. The last node, and the first node added together and then divided by two? get's us 2. Which happens to be the value we need to balance! Seems nice right?
What if you don't have the right value? How do you find the closest? If two values are the same distance away, then how do you choose? I'm going to think about these more and get back to you. Maybe even with some code to show!
Subscribe to:
Posts (Atom)