MarkS

Members
  • Content count

    468
  • Joined

  • Last visited

Community Reputation

180 Neutral

About MarkS

  • Rank
    GDNet+
  1. An artificial hand connected to bone and tendons?

    Quote:Original post by SteveDeFacto The question you asked was not relevant to my question. I'm asking if it exists so how exactly would I know how a device that does not exist works? (might be wrong) It does not exist. The problem isn't connecting to the tendons and bone, but rather sealing the skin around the system. Very recently, as in the past year, researchers developed a material that skin and bone grows in to. This provides a seal that was impossible prior. They tested this on a cat that had parts of its legs amputated, with stubs of this material embedded in place. http://www.bbc.co.uk/news/10404251 This is far from being able to test in humans, but it is promising. [edit] I was typing as way2lazy2care posted... Quote:Original post by way2lazy2care They exist. I have a friend who has a claw that opens and closes attached to a tendon in his shoulder. How does this work? How do they keep out contamination? How is the skin sealed to the device?
  2. Quote:Original post by codeman_nz OK thanks. I looked into the Bresenham algorithm and looks like exactly what I need. Now how would I apply it to a road which is several tiles wide? This is all VERY basic stuff. I want you to think it through, but I'll give you a hint: You have two vertical Bezier curves defining the sides of the road with horizontal spans of tiles between them. How do you think you ca accomplish this?
  3. Need some criticism and help...

    I like it! There are some minor changes I would want to make, but that is near perfect! I like the London setting in the 1900's. That will help with the character model and clothing. Of course, five dollars in 1900's London doesn't make sense, but five pounds would and would be a ridiculous sum for the times. About the size. The garden is not an ordinary garden and doesn't have to exist anywhere on earth. My dad's original game used a tile map of 257x257 tiles. It had great replayibility. The reason for such a large increase in my version is because monitors have increased greatly in resolution in the past 15 years (his game was full screen at 512x384 pixels!). It really is not as big as it sounds. There will be different gardens available with different themes.
  4. I never could get this to work. I set up a console app but anything Windows related caused tons of compiler and linker errors. I'm talking about hundreds of errors for simply adding a single Windows header (like "windows.h"). I never got to the point of actually writing any OpenGL code. I figure it was in the project settings, but that is a nightmare of horror movie proportions to navigate and make sense of, so I basically gave up. Any specific detail on how to make this work would be greatly appreciated. I'm tired of using MessageBox for ASSERT functionality!
  5. Quote:Original post by codeman_nz Thanks for that, it is very useful. How would I modify this to handle a tilemap with 10x10 pixel tiles? First, read the comments in my code. ;) Those comments do not exist outside of this thread and were made for you. Follow them. As LorenzoGatti mentioned, the size of your tiles is completely irrelevant. The important thing is the dimensions of your tile map. Think of your tile map as a bitmap (it is, actually). If you are using an array of chars, you have an 8-bit bitmap, an array of longs would give you a 32-bit bitmap. I have successfully used a tile map as the image pointer to a Win32 GDI bitmap and used GDI calls to set tiles. Anyway, the point is that no matter what you use to set the tile IDs in your tile map, make sure you stay within the array bounds. Quote:Original post by superpig As a general theory about this - similar to MarkS's solution but without the Bresenham approximation Of course there are other ways and I know that the Bresenham algorithm is looked down on, but it really is fitting here. Since a tile map is a 2D array of integers, there are no "half tiles", so an integer approximation is the best. Anyway, I never could get adjacency to work, so I caved and just drew lines to fill the gaps. There is very little to no overdraw and the lines drawn are typically either very short of near vertical/horizontal, so the curve is nearly pixel perfect and far smoother than the typical polyline approximation.
  6. Since you are using a 2D array of integers, you can treat the tile map as a bitmap and use any type of function used to plot pixels. Here is some code to demonstrate: #define ABS(x) (x < 0 ? -x : x) #define SIGN(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0)) typedef struct vertex{ float x,y; } void DrawLine(int Ax,int Ay,int Bx,int By,float r,float g,float b) { int y,x,dy,dx,sx,sy; int accum; dx = Bx - Ax; dy = By - Ay; sx = SIGN(dx); sy = SIGN(dy); dx = ABS(dx); dy = ABS(dy); Bx += sx; By += sy; if(dx > dy) { accum = dx >> 1; do{ // OpenGL was used to test this. Remove the GL calls // and uncomment your "mymap"line. glBegin(GL_POINTS); glColor3f(r,g,b); glVertex2i(Ax,Ay); glEnd(); //if(((Ax >= 0) && (Ax < maxXBounds)) && ((Ay >= 0) && (Ay < maxYBounds)) //mymap[Ax][Ay] = 1; accum -= dy; if(accum < 0) { accum += dx; Ay += sy; } Ax += sx; }while(Ax != Bx); }else{ accum = dy >> 1; do{ // OpenGL was used to test this. Remove the GL calls // and uncomment your "mymap"line. glBegin(GL_POINTS); glColor3f(r,g,b); glVertex2i(Ax,Ay); glEnd(); //if(((Ax >= 0) && (Ax < maxXBounds)) && ((Ay >= 0) && (Ay < maxYBounds)) //mymap[Ax][Ay] = 1; accum -= dx; if(accum < 0) { accum += dy; Ax += sx; } Ay += sy; }while(Ay != By); } } void AdaptiveSubdivideCurve(vertex p1,vertex p2,vertex p3,vertex p4,float tol) { bool l,r; float xs,ys; float xe,ye; float t; xs = p1.x - p2.x; ys = p1.y - p2.y; xe = p4.x - p2.x; ye = p4.y - p2.y; t = xs * ye - xe * ys; l = ((t * t) <= tol); xs = p1.x - p3.x; ys = p1.y - p3.y; xe = p4.x - p3.x; ye = p4.y - p3.y; t = xs * ye - xe * ys; r = ((t * t) <= tol); if(l && r) { DrawLine(p1.x,p1.y,p4.x,p4.y,0.0f,0.0f,0.0f); }else{ vertex l2,l3; vertex r2,r3; vertex h,m; h.x = (p2.x + p3.x) / 2; h.y = (p2.y + p3.y) / 2; l2.x = (p1.x + p2.x) / 2; l2.y = (p1.y + p2.y) / 2; l3.x = (l2.x + h.x) / 2; l3.y = (l2.y + h.y) / 2; r3.x = (p3.x + p4.x) / 2; r3.y = (p3.y + p4.y) / 2; r2.x = (h.x + r3.x) / 2; r2.y = (h.y + r3.y) / 2; m.x = (l3.x + r2.x) / 2; m.y = (l3.y + r2.y) / 2; AdaptiveSubdivideCurve(p1,l2,l3,m,tol); // Left curve AdaptiveSubdivideCurve(m,r2,r3,p4,tol); // Right curve } } The AdaptiveSubdivideCurve function takes four vertices and a tolerance value (plugging in 1.0f works fine) and draws a Bezier curve with adaptive subdivision. Since two point on the curve in screen space are not guaranteed to be coincident (you'll get gaps), I use a modified Bresenham line drawing algorithm to plot a line of pixels between the two end points when the flatness tests are satisfied. If there is only a single pixel to draw, the DrawLine function plots it and exits. The floating point variables are needed for the subdivision to work, but just supply integer values for the vertex coordinates. If your tile map is 100x100, this would draw a bell shaped curve in the tile map: vertex p1,p2,p3,p4; p1.x = 10; p1.y = 90; p2.x = 10; p2.y = 10; p3.x = 90; p3.y = 10; p4.x = 90; p4.y = 90; AdaptiveSubdivideCurve(p1,p2,p3,p4,1.0f);
  7. FBI Celebrates That It Prevented FBI's Own Bomb Plot

    Quote:Original post by LessBread One thing lost in this discussion is that following the arrest of Mohamed Osman Mohamud an actual terrorist attack occurred. A mosque that he attended intermittently was fire bombed and sustained considerable damage. There hasn't been much word in the media about how hard the FBI is working to find those actual terrorists. It appears that stories about actual terrorism don't fit into their predefined narratives. And the FBI is happier mugging for the cameras after they entrap a teenager than they are getting to work on actual terrorism. They appear to want to hold onto the lead role in this season of "security theater". Greenwald raises many salient objections to the arrest. His third point is most germane to this discussion. Quote: ... Third, there are ample facts that call into question whether Mohamud's actions were driven by the FBI's manipulation and pressure rather than his own predisposition to commit a crime. In June, he attempted to fly to Alaska in order to work on a fishing job he obtained through a friend, but he was on the Government's no-fly list. That caused the FBI to question him at the airport and then bar him from flying to Alaska, and thus prevented him from earning income with this job (para. 25). Having prevented him from working, the money the FBI then pumped him with -- including almost $3,000 in cash for him to rent his own apartment (para. 61) -- surely helped make him receptive to their suggestions and influence. And every other step taken to perpetrate this plot -- from planning its placement to assembling the materials to constructing the bomb -- was all done at the FBI's behest and with its indispensable support and direction. It's impossible to conceive of Mohamud having achieved anything on his own. Before being ensnared by the FBI, the only tangible action he had taken was to write three articles on "fitness and jihad" for the online magazine Jihad Recollections. At least based on what is known, he had no history of violence, no apparent criminal record, had never been to a training camp in Afghanistan, Pakistan or anywhere else, and -- before meeting the FBI -- had never taken a single step toward harming anyone. Does that sound like some menacing sleeper Terrorist to you? ... OK, first off, this article makes it sound like he committed this because he couldn't get to Alaska to get a job. Two issues here... 1.) Can I assume that he was unable to get even menial work in Oregon? He couldn't get anything? Not even a job at McDonald's or Walmart? NOTHING? 2.) It is safe to assume that he was on the no-fly list due to this plot. So, would it also be safe to assume that any money earned would have gone to this plot? If the FBI were not informed, and he succeeded in getting that job, what would the consequences have been? The last paragraph seems to be the final nail in the coffin pertaining to the obvious attempt by the FBI to entrap him. However, it is very clear that he could not have done this on his own. That is the whole point. He tried to seek help and that help then turned him over to the FBI. If the FBI wasn't directing him, it is very much possible that he would have gotten a hold of someone that shared his beliefs and had the resources. It would have delayed the timing, but there are plenty of outdoor events throughout the year that would have sufficed. What people seem to be missing here is that up until the point of him committing an actual act, there was little to charge him with. At any prior point in the investigation, an arrest would have netted conspiracy charges at best and there would have been a very good chance that he wouldn't have been convicted of that. Should the FBI use this tactic in every case? No, of course not! It wouldn't have worked in the 9/11 attack simply because of the complexity. However, I can see no fault in this in this or similar cases. A jury now will not have to find him guilty beyond a reasonable doubt, simply because his actions left absolutely no doubt of his intent. Something else that needs to be pointed out is that when the FBI does an investigation, they create a massive and meticulous paper trail. EVERYTHING has been documented from the initial contact from the informant to the time of the arrest, in detail. It would be asinine to expect law enforcement to share all of this information with the public. We have been fed just enough to know and nothing more. That is how it should be. Quote:Original post by LessBread Quote:Original post by ibebrett Quote:Original post by LessBread It's impossible to conceive of Mohamud having achieved anything on his own. Before being ensnared by the FBI, the only tangible action he had taken was to write three articles on "fitness and jihad" for the online magazine Jihad Recollections. At least based on what is known, he had no history of violence, no apparent criminal record, had never been to a training camp in Afghanistan, Pakistan or anywhere else, and -- before meeting the FBI -- had never taken a single step toward harming anyone. Does that sound like some menacing sleeper Terrorist to you? ... None of that matters, because he is a menacing sleeper terrorist by definition. He attempted to carry out a bomb plot up to the point of actually detonating a bomb. Having no criminal record prior to attempting murder means nothing. Yes, none of that matters to a lynch mob. He was a 19 year old kid roped into a fictitious plot hatched by the FBI, not "a menacing sleeper terrorist by definition." Don't buy into the hysteria. For contrast, here's what happens when the FBI targets an adult rather than an angry teenager. Their plot blows up in their face. FBI plant banned by mosque – because he was too extreme (7 December 2010) Quote: ... The terror case Monteilh had been helping build against Ahmadullah Niazi, the brother-in-law of Osama bin Laden's bodyguard, collapsed in September, when the bungling informant revealed that his FBI handlers had instructed him to entrap his potential target and told him that "Islam is a threat to our national security". Yesterday, as details of his efforts to persuade Niazi to blow up buildings became public, leading US Muslim organisations said they have suspended all contact with the FBI in protest against the excesses of agents who are secretly, and in some cases illegally, monitoring mosques. "The community feels betrayed," Shakeel Syed, executive director of the Islamic Shura Council of Southern California, an umbrella group of more than 75 mosques, told The Washington Post. "They got a guy, a bona fide criminal, and obviously trained him and sent him to infiltrate mosques... It's like a soap opera, for God's sake." Monteilh, who had previously served time in prison for forgery, says he was recruited on his release in 2006 by FBI agents, who he met in doughnut shops and Starbucks outlets. After being given the code name "Oracle", he was told to root out radicals among the region's 500,000 practising Muslims. ... In May 2007, Monteilh recorded a conversation in which he suggested to Niazi and another young man that they blow up buildings. Niazi appeared to agree with the idea, and the tape was subsequently used as evidence in the terror case against him. However, it now seems that Niazi had simply been attempting to humour someone he regarded as a dangerous extremist. Indeed, he was so concerned by "al-Aziz's" attempts to plot an attack that he reported it to community leaders, who passed details to police and took out a restraining order to prevent him from entering the Islamic centre. ... There's more about this here: Tension grows between Calif. Muslims, FBI after informant infiltrates mosque (December 5, 2010) You are taking some mistakes by the FBI and some of its agents in some investigations as an indictment of the agency and its investigations as a whole. This argument is so absurd I simply will not comment on it further.
  8. FBI Celebrates That It Prevented FBI's Own Bomb Plot

    Quote:Original post by Don Carnage I don't believe potential murderers should just be left alone to plot their evil deeds. Glad we agree here! Quote:Original post by Don Carnage But I'm afraid that some methods used in this fight may be counter productive... OK, then what would you suggest the FBI do when a potential terrorist goes to someone looking for help with a terrorist plot (maybe the word terrorist is overused these day, but it is fitting here) and that person informs the FBI? Should the FBI tap his phone, dig through his trash, bug his computer and wait for him to act? There is now no question as to his intent. A defense lawyer is going to have a very hard time getting him off. Quote:Original post by Don Carnage ...and even more concerned that the freedoms and rights that have been stripped from all citizens in the name of WOT, is not exactly helping the human race forward. Whether this point has any merit or not, it doesn't fit in with this discussion. His rights were not violated. He was actively searching for a means to an end and was given multiple chances to end the plot. He wanted to see it to its end. He was not forced or coerced. He was not entrapped.
  9. FBI Celebrates That It Prevented FBI's Own Bomb Plot

    Quote:Original post by ObscureWhen handed the mobile phone which he believed would detonate the bomb he dialed the number. Twice, I should add!
  10. FBI Celebrates That It Prevented FBI's Own Bomb Plot

    Quote:Original post by Erik Rufelt It seems comparable to cops dressing up as prostitutes, except that in this case they're actually doing something important. They obviously never gave him the ability to actually set off a bomb, just the means to prove that he would. The same tactics are used for catching pretty much any criminal. If people deal cocaine, then they get caught dealing with the feds, if they evade taxes, they get caught transferring money into a government account, and if they build bombs then thank God they get caught buying the goods from the police. ^^^This It isn't like the FBI posted ads offering to help anyone willing to build a bomb and kill innocent people. The people involved already had a plan and needed help. They went to the "wrong" person that then turned them over to the FBI. After that, it became a sting operation. The issue is that in order to prosecute someone in the US, the prosecutor needs to show intent. It isn't enough that he expresses interest in killing Americans as such a statement is protected speech. The agents gave them the ability to go a step beyond simple speech as well as the ability to back out.
  11. FBI Celebrates That It Prevented FBI's Own Bomb Plot

    Yes? And? Federal authorities were informed in the early planning stages of both plots and made efforts to stop them. At the point that authorities came onto the scene, there was little to nothing to charge the person(s) with. If authorities had simply done nothing, the people involved would have continued to search for co-conspirators and these two incidents would have turned very ugly. All the FBI did in these two cases was allow the people involved dig their own graves. They were given multiple opportunities to back out and insisted on carrying on with the plots. I have no sympathy.
  12. Quote:Original post by VideroBoy Quote:Original post by MarkS However, the reaction will be stronger (towards the negative) if reproduction is a possibility. Do you mean people who'd already be opposed would react more strongly, or that there'd be more opposition overall? This would be on the order of interracial relationships and mixed race children from 50 or so years ago, but amplified due to the fact that one of the pair is not human. People that have no opposition to interracial marriages would oppose this and those that oppose interracial marriages would probably get (more) violent. It would not be accepted by the majority. And let's not even think of the religious component. I don't think bestiality would apply, but that is an interesting argument.
  13. Quote:Original post by phantom That's simple; it would get the same reaction (probably from both parties) as things such as inter-racial and homosexual relationships get now/in the past. There will be groups who are anti, pro and don't care. This. However, the reaction will be stronger (towards the negative) if reproduction is a possibility.
  14. Quote:Original post by GMuser The nuclear weapons did cause catastrophic damage, the ship fell to the ground and broke apart. Yes, it can repair itself, but it takes time to fully repair and plus any repair of that kind (refusing materials, reversing burnt material state) simply has to involve massive amounts of energy which the aliens would have to eventually run out of. Actually, if you watch the scene, you see the craft leave the middle of the fire ball (the hottest part of the blast, in excess of what, millions of degrees C?) and not crash out of control, but slowly float down to earth. Yes, it did damage, but no where near what would have been expected. The level of damage that was shown is what I would have expected with traditional ordinance. There are no materials that can withstand the center of a nuclear blast. Even though the individual atoms will more or less remain intact, the heat and pressure would rip any type of molecule apart. And remember, the missile crashed through the hull before detonation, so not only did the inside of the ship get the full dose of heat and radiation, but also the full pressure wave. Even you you want to try to justify this, remember that the creatures (biological, I might add) reside inside the ship. They walked away unscathed as well. I love sci-fi, but I want plausibility. I do not mind my imagination being stretched, but I do want some slight manor of possibility. This scene ruined the movie for me.
  15. I love browser bars!!!!!1111111

    Many browser bars are malware and those that are not make it easy for malware to find a vector into your computer. To this day, I do not know why this is allowed or why the big names in the industry both create them and tack them on to installers. I still have Yahoo toolbar floating around my system because an installer went ahead and installed it even after I requested that it not (clearly, I must have made a mistake, right?) and the toolbar's uninstaller doesn't seem to work.