Hi Guys, Im currantly having a problem with simulating balls bouncing of each other in a 2d space, everything is working and all, but it just doesant seem natural for me... If we had any math wizzes here now is your time please:) my circles are painted inside of rectangles..... This is what is the code im using to find the new x and y coordinates of the circles. specifically this piece here... //Pythagerum theorem, a^2 + b^2 = c^2, to figure out the distance between the two circles' centers. int distance = (int) Math.sqrt(((currantXa - currantXb) * (currantXa - …

Member Avatar
Member Avatar
+0 forum 14

Simulate a patient’s lines using queues with enqueue ( ), dequeue ( ) and printQueue ( ) operations. Define a queue node in the following manner: typedef struct queueNode { int patientID; // Unique identifier; starts at 1; after 24 hours should be reset to 1 int checkupTime; // Random time; int totalTime; // totalTime = checkupTime + sum of checkupTimes of patients in line //before this patient; units in minutes struct queueNode *pNext; } QueueNode;  You will randomly generate arrival times and checkup times of patients such that patients arrive every one to five minutes and their checkup …

Member Avatar
Member Avatar
+0 forum 4

Saw [this](http://www.daniweb.com/software-development/cpp/code/216430/add-a-little-graphics-to-your-console) and decided to make a little spinoff with some physics of mine. Enjoy!

Member Avatar
Member Avatar
+1 forum 2

Hi, So I am working on a drink machine simulation. I have a text file that holds the prices, names and inventory. My problem is It won't let me set my prices at 1.00 or higher. Ex: I set the price to 1.50 in the text file then when the program reads the info from the text it will only read the cents so instead of 1.50 it will read .50 textfile looks like this: Apple Juice 1.50 20 Mango Juice 1.50 20 Sprite Mix 1.90 20 Coca Cola 1.90 20 my code: #include <iostream> #include <string> #include <fstream> #include …

Member Avatar
Member Avatar
+0 forum 4

I's like to simulate the behaviour of Dynamixel Pro's robot actuator, including the control table, please see [it here](http://support.robotis.com/en/product/dynamixel_pro/control_table.htm). I can simulate the robot actuator fine, but simulating the control table is a bit puzzling for me. The control table has address from 0 - 892. One way I can think of doing this is to setup variables from _0 - _892, and populate them with corresponding values. Bt requires a large amount of getters and setters. Another way is to use array address[892], and populate the corresponding values. But with array, I'm not sure if it is possible to …

Member Avatar
Member Avatar
+0 forum 1

I am doing a school project which is an airplane collision detection system. Can anyone show me a few examples or pseudocode of implementation of closest pair algorithm O(n^2), O(n log^2 n), O(n log n)?

Member Avatar
Member Avatar
+0 forum 10

I'm new to networking and right now I was messing around in packet tracer, but I'm having trouble with the scenario I created. I will upload a couple of screenshots i've taken of my situation and I will proceed to explain my problem and what im trying to achieve. I have three networks, the 192.168.1.x network, then the 10.x.x.x network which is separeted by a router. the 10.x.x.x network is also linked to another router, which i intend to connect to the 172.16.x.x network. My problem is this.. I have no clue how to connect the network to two routers. …

Member Avatar
Member Avatar
+0 forum 1

hello , I am just wondering if anyone tried to implement a wsn network using ns3, if there is any** i want to ask about it**

Member Avatar
+0 forum 0

I recently applied for a PHP programming job and they required me to do a coding challenge. One of the challenges involved simulating the card game war which I found intriguing. I "over-engineered" it as they requested, but I still don't think it was good enough for them. Is there anything I could have done better? A live example is here: http://dev.lifeboatcreative.com/war/index.php The rules this game is based off are found here: http://www.pagat.com/war/war.html Source files are attached.

Member Avatar
Member Avatar
+2 forum 8

Hello everyone, I stumbled upon a video about the monty hall problem, which I found very well explained, and a lot of comments below the video that were against the conclusion that it **is better to switch**. To clarify, I wrote this small program that simulates the game and allows everyone to test it for themselves. I got the following results: + Calculation Preferences + Enter the amount of repetitions: 3000 Do you want to switch choice? [Y/N] y + Calculation Results + Amount of repetitions: 3000 Correct choices: 2008 Wrong choices: 992 Winpercentage: 66.933333 and: + Calculation Preferences + …

Member Avatar
Member Avatar
+0 forum 1

Here's some simulation of the basic push_back and pop_back functions from stl vectors, "inspired" by this thread: http://www.daniweb.com/software-development/cpp/threads/427912/question-about-a-simple-vector-class-template

Member Avatar
Member Avatar
+0 forum 1

I just started learning Java (Currently, I know basic swing components like JPanels, text areas, textfields etc) and I have chosen a Logic Circuit Simulator as a project. My objective is to simulate the working of logic gates by making circuits using drag & drop. So far, I have thought about putting the devices in a JList and then making a JPanel for the circuit area. The users will drag out of the JList and onto the JPanel where the circuit will be made. But I have no idea how to implement this in java. Please give me some directions …

Member Avatar
Member Avatar
+0 forum 4

Good day, I have a college project in which I need to create a program which simulates an Erlang(k) variable. I am not talking about the Erlang language, it's about a standard Gamma(0,1,k), k ϵ N+. I appreciate if someone can help me out or give me advice on how to approach this problem. I've written the formulas and theorem that comes with this problem: [Erlang distribution equations](http://imageshack.us/g/96/erlang2.jpg/) All the best, K33p3r

Member Avatar
Member Avatar
+0 forum 1

Hello. We have been asked to write a program of an event driven simulation in dynamic partition. where we are given a number of jobs with it's given time and job size. the job should remain on the memory until completion (time clocks down to 0). the program should measure the *throughput *storage utilization *waiting queue length *waiting time in queue *external fragmentation I'm not yet that familiar with c# programming so any thoughts on how to go about this? I've been looking on the net and it seems like pointers was used often but I don't know how to …

Member Avatar
Member Avatar
+0 forum 16

Hi all, As the title says, I have to create a C++ program (for my thesis) that will solve all the motion equations and have a graphic of the moving engine system. I've done all the "heavy" lifting but I am stuck on the graphics part as I haven't work with graphics in C++ before. As requested by my thesis topic, I am using Embarcadero's C++ Builder and I would like some ideas on which libs or components would make my life a bit easier. I've already found SDL to be a good candidate but it turns out to be …

Member Avatar
Member Avatar
+0 forum 2

I've planned to do my final year project on neighbor discovery in sensor networks... I wanna know if simulation of sensor nodes is possible in C# and .net? reply me ASAP. thnx in advance

Member Avatar
+0 forum 0

I was wondering if anyone could help me compile code which will actually work for my comiler. I've found many examples and two good references for... keyboard [url]http://www.codeproject.com/KB/system/keyboard.aspx[/url] and mouse [url]http://msdn.microsoft.com/en-us/library/ms646260[/url] ...but have never actually gotten a working version to run and therefore haven't been able to fiddle around with functions and learn much about how these event functions work. -If someone has a bit of code to set pointer to 100,100 on the screen, click, and type a couple letters, that would be great. I'm using Microsoft Visual Studio 2010 Express Vista 64-bit OS Thanks in advance and I …

Member Avatar
Member Avatar
+0 forum 4

Dear friends, I have downloaded and installed cygwin 1.7 on my windows 7 PC for installing ns2. But whenever I run the command ./install The error that comes is attached. I am totally novice to this environment. Please help with this. I visited Scriptics.com as suggested in the error msg, but the sit is not proper. Please help.

Member Avatar
+0 forum 0

I am interested in hiring a software developer but I do not know what should I be asking for when I post the job. My project consists in developing a software that can analyze an edge-matching puzzle game of my invention to produce as many possible solutions numbered, and also creating an online version of my game with different levels of difficulty. The possible solutions to my game could be exponentially high. I’ve heard that Java should be language and that to get the solutions the program should run simulations. Can you please give me your suggestions?

Member Avatar
Member Avatar
+0 forum 2

Hey there :) :) :) I'm doing a "simulation" project for the first-come, first-served (FCFS) CPU scheduling algorithm. To give u an idea of what this is: CPU Scheduling is all about having a Scheduler determine which process should be allocated to the CPU next. It has many various algorithms such as priority sched, shortest-job-first, etc. But for this project, I'm doing the FCFS. Yes! It's supposed to be the Easiest sched algorithm to implement. :P Of course, since this is a "Simulation", I'm gonna have to make representations (models and not the real thing in the system) of the …

Member Avatar
Member Avatar
+0 forum 6

hi... i wanted to know if any of you could help me... i need to create an unidirectional link between two nodes using TCP on Network Simulator. For this, I suppose this means I need to setup a half-duplex on the tcl configuration, Ive read the entire NSnam manual and Im not able to find something that could be useful to control that. Can you help me, maybe an example or something?

Member Avatar
+0 forum 0

I am doing my final year of undergraduation and I need a java simulator that simulates a parking lot. Can anybody provide me with a simulator or suggest a open source simulator? I have no backgroung in building simulators. Is it easy? If I had to build a simulator on my own, how long will it take?

Member Avatar
Member Avatar
+0 forum 1

Hello everybody! a few days ago, i read this post in the [URL="http://www.daniweb.com/forums/thread257510.html"]Advanced and Intermediate Projects[/URL]-Thread: [QUOTE]Create an operating system prototype/emulator in Python. You might research into various operating systems to get an idea for what to implement. Things you can implement: A login. A shell system. A explorer system (If done well enough, you can disable your own explorer process at startup and execute your own.) A desktop window. A web browser. (A project in and of itself.) A plain text editor. (Another individual project.) A control panel/system configuration set of utilities.[/QUOTE] ...and I thought it would be fun …

Member Avatar
Member Avatar
+0 forum 5

I can't say I have ever heard of pussy power being used as a driver for advanced chip technology development, but that's precisely what researchers at IBM are claiming. A team of boffins at IBM have been speaking about how they have arrived at something of a milestone breakthrough: a supercomputer that simulates a brain in near real time and has more cerebral cortex capacity than a cat. The cognitive computing team which is headed up by IBM Research managed to achieve what it says are "significant advances in large-scale cortical simulation" as well as "a new algorithm that synthesizes …

Member Avatar
+1 forum 0

Surprisingly, the answer could well be yes. At least if a bunch of computer science researchers at [URL="http://www.dur.ac.uk/computer.science/"]Durham University[/URL] have anything to do with it. The group have taken the 3D game engine that powers the immersive Half Life 2 game and used it to develop a realistic virtual simulation of the university computer science department. More to the point, they have created a realistic fire drill simulator which might just help save a life or two. The idea being that the 'game' can be used to determine how real people behave when confronted by a virtual fire within a …

Member Avatar
+0 forum 0

The End.