My first C4D plugin.

Navier-Stokes equations! damn I wish I paid more attention on my fluid dynamics lessons at Uni :(

something like:

p{delta v / delta t + V * delta V} = [-delta P] + [micro(delta)^2*v] +[f]

arg my minds fuzzy need to see my notes!

::EDIT::

Downloaded the chapters, just reading now! again thank you
 
Last edited:
Hey Anhar. I'm brushing up on my math. The derivatives are done. Integrals are next up...lovely. Maybe in a couple more weeks I'll be able to hold a conversation on the subject. Honestly there is no way I could remember all of this stuff, but it does seem easier this time around. In an indirect way, thanks for the motivation keeping me up on the subject. :)
It would be an interesting topic but I doubt many would take part in it.
 
Yea, maths is like going to the gym, basically if you don't "use it, you lose it"

Its always refreshing to work out now and then :)

thats why I always look at my Uni notes now and then, and try to figure out what the heck I was doing!
 
Hey Raptor, I've just fallen in Love with C++, I've always respected it highly (always wanted to learn it, but this time properly)

So... I've jumped right into the deep end, why?

well the story goes like this:

My self proposed MSc Disseratation is based upon Neural Network based ALUs (a crazy new idea!) anyways after much wrangling with multiple Profs, I convinced them in the end and got it approved.

But althouh I still have upto April (when I actually begin my disseratation), knowing how complicated its going to be, I've written up the code (60%) BUT its in VB, nothing wrong with this BUT this is going to be looked at by academics and Industry pros, and for purely "academic HIP" factor I'm planning on porting it to C++ !

Sooo.. Just to learn it in blazing time, I've been doing "mini" projects, and OMG everytime I use it I keep falling in love with it (C++), it just "clicks"

In 4 days of installing a C++ IDE (code::blocks, open source) I've managed to get two mini projects complete, and now on my latest mini project ::

A password benchmarker! it basically takes your passwords and Bruteforces all possible combination and then gives a bench mark, its not complete but here is the incomplete code:

PHP:
#include <iostream>
#include <vector>
#include <iostream>


using namespace std;

//out global string varibales
string target;
string test;
int SQ_size;       //this holds the number of letters being bruteforced
bool PassF;        //this flags true to add to combination vector
int terminator;    //this holds the number of Zs found

//all our global vectors
vector<string> cSet;
vector<string> combination;

//all our functions/sub routines
void LoadChar();
void bruteF();
void testCombi();
void testTarget();


int main()      //our main loop
{

char KeyIn[1000];

SQ_size = 1;
PassF = false;

cout<<"Please enter your Password: "<<endl;
cin.getline(KeyIn,1000);

target = KeyIn;
cout<<target<<endl;

LoadChar();

//initialize the combination vector
combination.push_back("!");

bruteF();
bruteF();



system("PAUSE");
}

void bruteF()
{

int terminalNode;
PassF = false;

terminalNode = SQ_size;
terminalNode--;

for(int i = 0; i<cSet.size();i++)
    {
        combination[terminalNode] = cSet.at(i);

        testCombi();
        testTarget();

        if(PassF == true)
        {
            i = cSet.size();
        }

    }


if(PassF == false)
{
cout<<"Stack Increase Mode Entered"<<endl;
terminator = 0;

    for(int i= 0; i<combination.size(); i++)
    {
        if(combination.at(i) == "z")
        {
            terminator++;
        }

    }

    if(terminator == combination.size())
    {
    combination.push_back("a");
    SQ_size++;
    cout<<"Combination Set Increased!"<<endl;

    //reset terminal node
    combination[terminalNode]="a";
    }
}

}

void testCombi()
{
test = "";
for(int i = 0; i<combination.size(); i++)
{
test = test + combination.at(i);
}
cout<<test<<endl;
}

void testTarget()
{
            if(test == target)
            {
                cout<<"Password Found: "<<test<<endl;
                PassF = true;
            }
            else
            {
                PassF = false;
            }

}
void LoadChar(void)
{
    cSet.push_back("a");
    cSet.push_back("b");
    cSet.push_back("c");
    cSet.push_back("d");
    cSet.push_back("e");
    cSet.push_back("f");
    cSet.push_back("g");
    cSet.push_back("h");
    cSet.push_back("i");
    cSet.push_back("j");
    cSet.push_back("k");
    cSet.push_back("l");
    cSet.push_back("m");
    cSet.push_back("n");
    cSet.push_back("o");
    cSet.push_back("p");
    cSet.push_back("q");
    cSet.push_back("r");
    cSet.push_back("s");
    cSet.push_back("t");
    cSet.push_back("u");
    cSet.push_back("v");
    cSet.push_back("w");
    cSet.push_back("x");
    cSet.push_back("y");
    cSet.push_back("z");

    cout<<"Character set Loaded!:"<<endl;

    for(int i = 0; i< cSet.size(); i++)
    {
    cout<<cSet.at(i)<< " ";
    }
    cout<<"Size: "<<cSet.size()<<endl;

}

I know, I know its probably TOTAL crap, but I'm just a complete newbie at C++, I'm sure it can be done in like a 10th of my finished code, but we all have to start somewere right? :) Sorry I'm just excited man!
 
Last edited:
//edited out previous mumbo jumbo.

When using cin into an array like you have I've found it usefull in the past to initialize the array to 0's first. That just ensures the array has a null terminator before using cin. Maybe it was just the compiler I used at the time but sometimes cin wouldn't terminate the input string and it would be inaccurate.I think just the 1st and or 2nd had to be nulls. But I used memset() anyways before using keyin.
Just in case you notice anything weird.

LoadChar() could be optimized a bit.

Looks good though. I love c++. It's fast too.
 
Last edited:
thanks for the headsup Raptor!
just found this on some other forum, made me laugh :) :

Reply #1 “Real Men use Assembly, High level languages is for sissies!”

Reply #2 “No, Real mean use Machine code, Assembly is for wimps!”

Reply #3 “NO, Real men use a soldering iron!”
 
lol ! I used to "crimp" wires with my teeth (because I didn't own a proper crimping tool :P ) yea leaves a nasty taste for sure! or was that just me?
 
Unless strapped I never did it for 2 reasons. I chipped a tooth as a kid playing hockey so that was enough of that.
2/ reminded me of chewing on tinfoil. But I've seen people still doing it.

Taste wise I do remember a certain flavour after shorting out high voltage connections a few times. Something about the ozone changing in that area. Sounds a bit crazy but it's something to that effect. I could smell it too.
I made a jacobs ladder once with an old furnace transformer. It would produce the same atmospheric-taste-smell-thing. And yes, I did shock myself off that too. All 10Kv of it.

Do you play chess? I'd be surprised if not.

//I just found out C4D has a built in chess game complete with models and board and really works. You can play it I guess. It's apparently a 'hidden gem' as Maxon calls it. I think it only appears on Christmas day, as a reward to those who find themselves working on Christams. There is also one for easter.
I thought that was cool of Maxon to do that.

-Gord.
 
Hehe, I was chess captain in my middle school, managed to organise the schools first chess club, boy I have such a nerdy history :p !

Oh man, I know about getting electrocuted, did that serveral times, thanks AC and fuses and trips otherwise well...

Damn! so does that mean if you changed your PC clock to Christmas day you can play it or does it only activate via some Internet thing?

Cool find in anycase
 
No I haven't tried turning back the clock yet. I used to have ChessMaster though.
Haven't player in a few years, but if you have a board handy...

I'm White.
1a: KingsPawn->King3. (I'll have to look up how to write those moves again.)

//Maybe I'll change that to 1-001. I assume it'll be a long game.
 
I was thinking just set up a board at home & just post a move at the end of any of your posts but I guess that's not too practicle. Have to think about that.

Question. What would be the proper way to write the first basic pawn move?.
P-K4?
It begins at 1 right?
 
Move:40

sMove040.jpg


Your Move

EDIT::

man, I've just been obsessed with getting a working 3d cube, and I think I've just craked it, but now I need to learn how to do camera rotation now.

basically I created an array that holds 8 (X,Y,Z) "nodes" of the cube, then I simply loop through using the Perspective Projection to turn that 3d "node" into a 2d point, I basically made another temp Array which takes the orginal node co-ordinates and then adds the position of the camera, this temp array is then projected, finally I just draw lines between the newly projected points.

I think I'll port it over to C++ (I think its possible to "paint" in console mode, not sure, might have to use the dreaded Win API thingy)
 
Last edited:
Back
Top