Archived

This topic is now archived and is closed to further replies.

bobster

a simple 'fusion' engine

Recommended Posts

bobster    157
Hi, I was wondering as a noob whether you guys could give me some quick help on this one. Today on TV I saw that fusion power is soon to become a reality. I was wondering how I could program my computer to produce the electrical fields required to successfully contain reacting atoms in a fusion process, preferably using my harddrive motor and a box of hairpins. I''m also quite sure that I''ll need to use pointers somewhere along the way, so is anyone able to mail me a short thesis on it to the UK, I don''t like reading off the screen for too long, it hurts my eye-peepers. If anyone is able to tell me what other basic programming components I would need, produce the required code, and tell me why I should want such a device as a cold fusion reactor inside my computer, a reply would be most appreciated. P.S. can anyone send me a link to creating a class in c++, I can''t seem to find any on the net.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I think you should look at

http://www.macromedia.com/software/coldfusion/

They have a cross-platform cold fusion solution in a box already.

Share this post


Link to post
Share on other sites
BillPo    122
Hahaha. Good one

Creating a class in C++? I can''t think of any specific links off the top of my head, but it isn''t too difficult. First you start with a declaration of the class like so
class MyClass
{
public:
// Public members go here, like say your constructor

MyClass(); // constructor

~MyClass(); // destructor


// Some public functions

void setMyInt(int i);
int getMyInt();

private:
// private members now

int myInt;
};

These declarations are typically placed in a header file since any source that needs to use the class requires the class'' declaration so that the compiler knows what the members are and such.

Then in a source file you can define the methods
#include "MyClass.h"  // doesn''t necessarily have to be in a header file


// constructor

MyClass::MyClass()
{
myInt = 0;
}

// destructor

MyClass::~MyClass()
{
// nothing to do in this particular example

}

void MyClass::setMyInt(int i)
{
myInt = i;
}

int MyClass::getMyInt()
{
return i;
}


There, thats the basic way to do it. Then when you need to use this class in code you simply use MyClass as the type for your variable. Like this
#include "MyClass.h"
//...

void foo()
{
MyClass mc; // constructor on mc called here

mc.setMyInt(100);
cout << mc.getMyInt() << endl; // prints "100" ofcourse

} // destructor on mc called here



It does of course get more complicated than this, but atleast this can get you started.

-out

Share this post


Link to post
Share on other sites
Tooko    100
quote:
Original post by bobster
I was wondering how I could program my computer to produce the electrical fields required to successfully contain reacting atoms in a fusion process, etc etc etc


Are you suggesting some code that actually produces physical electrical fields?


... am I missing something?

It’s not cruelty if you inject enough amphetamines…

Share this post


Link to post
Share on other sites
Jason2Jason    166
quote:
Original post by Tooko
quote:
Original post by bobster
I was wondering how I could program my computer to produce the electrical fields required to successfully contain reacting atoms in a fusion process, etc etc etc


Are you suggesting some code that actually produces physical electrical fields?


... am I missing something?

It’s not cruelty if you inject enough amphetamines…


Technicly code does that anyway, by producing electricin circuits of high and low voltages, that we know as 0 and 1.

But thats technicly. Maybe you could hook up a transformaer to a USB port, and write a program to send alternating current through it, which will get increased by the transformer to something like 10,000 volts. Is that enough for your needs? You would have to wire your own fusion equipment up, but in theory the computer might generate the power...

Oh and for the class question, you might want to buy a C++ book that offers lots of detail of classes, inheritence, polymorphism, OOP design. C++ in 21 days is good for beginners!

-J

Share this post


Link to post
Share on other sites
NeverSayDie    122
Hmmm. You might want to look into COBOL - used properly, it can start small-scale fusion reactions... Combined with the box of hairpins you mentioned, that should meet your needs...

Share this post


Link to post
Share on other sites
Jason2Jason    166
quote:
Original post by Koobazaur
...you're kidding, right?


Yes and no... I mean you can try the transformer thing, but something could blow (see wildfire's post!) or you could get killed...

EDIT: 'would' and 'you'd' changed to 'could'.

[edited by - jason2jason on August 12, 2003 10:36:36 AM]

Share this post


Link to post
Share on other sites
bobster    157
yes what I want to be able to create is a fusion power reactor in my computer. I realise that this is a difficult task to achieve, I''m not naive enough to expect to be able to power a whole city or anything. I was thinking more along the lines of just enough power for my house and my neighbours, and maybe with a view to selling it to some other members of my street. I''m very keen on the USB transformer idea, maybe someone could come up with some code for it for me, maybe something along the lines of:

FusionPowerGenerator->USBTransformer(1millionterawatts);

with perhaps some ancilliary code to tie up the technicalities.
I also havent yet received any theses on pointers, I''m quite disappointed no one has been able to mail me one yet. I''m quite sure that this project should be no problem, I''m only a noob i just need some guidance!

Share this post


Link to post
Share on other sites
Wildfire    154
Want some pointers... well, check out this funky function pointers from my project


// class declaration

typedef void (Component:: *TargetPtr) (float,float);
typedef std::list<TargetPtr> Target;
typedef Target::iterator Objective;

// one of the classes functions

for (Objective target=_target.begin();target!=_target.end();target++)
(this->*(*target))(_minimum,_maximum);

I'm sure they'll come in handy



[edited by - Wildfire on August 12, 2003 9:56:43 AM]

Share this post


Link to post
Share on other sites
Jason2Jason    166
Yes I know its a joke, everyone knows you'd have to use two USB ports to get it to work effectivly!

-J


EDIT: I do really know its a joke.


[edited by - jason2jason on August 12, 2003 11:36:08 AM]

Share this post


Link to post
Share on other sites
PhiberOptic    128
I know the source of what you speak.. Just buy a SMALL and FAST CPU first.. and I mean it! like 0.001 mm and 1000000000000 THZ fast).. Shouldn''t be that hard to find..

Then just run these lines of c code:

while(1)
{
printf("Explode you bastard!!\n");
}

When the CPU is hot enough, and if you have some H in the surounding place, it will probably be a fusion reaction! =))

Go for it! =) (you won''t need classes or pointers... if you want the speed to increase, maybe you should code it in asm instead )

----------------------------------------------
Petter Nordlander

"There are only 10 kinds of people in the world. The who understand binary and those who don''t"

Share this post


Link to post
Share on other sites
Jason2Jason    166
quote:
Original post by TheNerd Tk421
get an elcetromagnet... and use an language that talks direclty to hardware(punch cards ne 1?...lol) binary?...mabye...


You could plug that in to my USB transformer, and just write software to control that.

-J

Share this post


Link to post
Share on other sites