Search Results

Search found 1576 results on 64 pages for 'separating axis theorem'.

Page 48/64 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • UIImageView "Sprite Movement" How?

    - by Tate Allen
    Hi all, I am trying to make a game for the iPhone/iPod Touch. I am somewhat new to iPhone programming and extremely new to iPhone game programming so try to bear with me if this is a stupid question. How to I make my character, a UIImageView, move to the right or left, along the x axis. Just a simple translation across the screen. This is very frustrating so if you could link me to a tutorial or something like that, it would be much appreciated. Thanks in advance, Tate

    Read the article

  • extracting a quadrilateral image to a rectangle

    - by Will
    In the image below, the sign on the side of the van is not face-on to the camera. I want to calculate, as best I can with the pixels I have, what it'd look like face on. I imagine that this is some kind of loop through the x and y axis doing a Bresenham's line on both dimensions at once with some kind of mixing when pixels in the source image overlap - some sub-pixel mixing of some sort? What approaches are there, and how do you mix the pixels? Is there a standard approach for this?

    Read the article

  • jQuery draggable leaving cloned html behind

    - by Alex Crooks
    I am using jQuery UI; Draggable http://jqueryui.com/demos/draggable invoked like this: $(document).ready(function(){ $("#side_bar").sortable({ revert: true }); $(".draggable").draggable({ containment: 'parent', hascroll: true, handle: 'div.box_header', scrollSensitivity: 100, scrollSpeed: 100, axis: 'y', connectToSortable: '#side_bar', helper: 'clone', opacity: 0.35 }); }); You can see the html structure on http://www.sarsclan.co.uk (right side bar area). It seems to create a transparant clone as your dragging, but when you drop it puts the draggable div in the right place, but leaves the original div in it's place and just appends the dom with a clone of that original div in its new place.

    Read the article

  • 3D Math: Calculate Bank (Roll) angle from Look and Up orthogonal vectors

    - by 742
    I hope this is the proper location to ask this question which is the same as this one, but expressed as pure math instead of graphically (at least I hope I translated the problem to math correctly). Considering: two vectors that are orthogonal: Up (ux, uy, uz) and Look (lx, ly, lz) a plane P which is perpendicular to Look (hence including Up) Y1 which is the projection of Y (vertical axis) along Look onto P Question: what is the value of the angle between Y1 and Up? As mathematicians will agree, this is a very basic question, but I've been scratching my head for at least two weeks without being able to visualize how to project Y onto P... maybe now too old for finding solutions to school exercises. I'm looking for the trigonometric solution, not a solution using a matrix. Thanks.

    Read the article

  • Flipping issue when interpolating Rotations using Quaternions

    - by uhuu
    I use slerp to interpolate between two quaternions representing rotations. The resulting rotation is then extracted as Euler angles to be fed into a graphics lib. This kind of works, but I have the following problem; when rotating around two (one works just fine) axes in the direction of the green arrow as shown in the left frame here the rotation soon jumps around to rotate from the opposite site to the opposite visual direction, as indicated by the red arrow in the right frame. This may be logical from a mathematical perspective (although not to me), but it is undesired. How could I achieve an interpolation with no visual flipping and changing of directions when rotating around more than one axis, following the green arrow at all times until the interpolation is complete? Thanks in advance.

    Read the article

  • How can I use gnuplot to plot data that is in an un-friendly format?

    - by Zack
    I need to graph some data that is not exactly in the most friendly format, most examples or usage puts things in a nice column/table that is very easy to parse and graph. However I have the following format (and am a bit stuck as to how to tackle this): DATE1 label_1 xx yy DATE1 label_2 xx yy DATE1 label_3 xx yy DATE2 label_2 xx yy DATE2 label_3 xx yy DATE3 label_1 xx yy DATE3 label_2 xx yy DATE3 label_3 xx yy DATE4 label_2 xx yy DATE4 label_3 xx yy ...continues *I've added the extra space between the dates for readability. **Note: under DATE2,DATE4 label_1 is missing, i.e. the data file may have labels that come and go and should represent a discontinuity in the graph. I'd like to have the X-axis use the DATEX for the labels, and then create two lines for each label (xx and yy respectively). Does anyone have any suggestions on the best way to tackle this problem?

    Read the article

  • Looking for C# framework for plotting scientific data: 2d/3d ...

    - by Ivan
    I need to visualize some scientific calculations. I generally prefer reusing code if there is already a good available instead of inventing wheels each time, that's why I am asking. I need a C# code to draw charts (just outputting a bitmap is ok) of 2d (y=f(x)) and 3d (z=f(x,y)) digital data sets (where any axis can be float, int or datetime), sometimes combined. If I go here and click 3D in the navigation bar on the left, there I can see what I need. But the cheapest version costs $759 there, looks scary for a hobby project of an east-european student :-(

    Read the article

  • Actionscript 3 3D sizing problem

    - by Simon
    I have an application where I can have an image moving towards the eye. When the image enlarged, I would like to have it resized as 635 px where initial size was 220 px. I have the image with starting position as 0 in z axis. I am wanting to calculate the distance from starting position to the resized image. I have already calculate the distance by hand but when I tried to put it on flash the result is not what i wanted. I am sure that the value I calculated was correct. I know it may be hard to understand my problem. Please help.

    Read the article

  • How to get orientation of android from gyrsocope sensor events ?

    - by Pritam
    I am using android 2.3 on Nexus S and want to get orientation from gyroscope sensor events. As gyro gives angular velocity how to use this for getting device orientation ? Also is there any way we can get pure linear accelerations on phone's axis, without gravity vector. I expected this from Linear acceleration sensor event but just found a post and referred android source as well for Sensor which currently uses only accelerometer. So what's the best way to combine the readings from both hardware to get pure accelerations without gravity inclusions ? Thanks.

    Read the article

  • Create a Sin wave line with Processing

    - by Nintari
    Hey everybody, first post here, and probably an easy one. I've got the code from Processing's reference site: float a = 0.0; float inc = TWO_PI/25.0; for(int i=0; i<100; i=i+4) { line(i, 50, i, 50+sin(a)*40.0); a = a + inc; } http://processing.org/reference/sin_.html However, what I need is a line that follows the curve of a Sin wave, not lines representing points along the curve and ending at the 0 axis. So basically I need to draw an "S" shape with a sin wave equation. Can someone run me through how to do this? Thank you in advance, -Askee

    Read the article

  • simple plot algorithm with autoscale

    - by adrin
    I need to implement a simple plotting component in C#(WPF to be more precise). What i have is a collection of data samples containing time (X axis) and a value (both double types). I have a drawing canvas of a fixed size (Width x Height) and a DrawLine method/function that can draw on it. The problem I am facing now is how do I draw the plot so that it is autoscaled? In other words how do I map the samples I have to actual pixels on my Width x Height canvas?

    Read the article

  • finding an adjacent node in xml through xpath

    - by kolosy
    i have a deeply nested structure (actually parsing out xhtml, so lots of nasty), like so: <tr> <td> <font id="blah"> stuff </font> </td> </tr> <tr> <td> more stuff </td> </tr> and this repeats in a long table. i need an xpath expression that will select the second font tag (or rather it's text()). i was looking at the preceding-sibling axis, but something isn't quite working right. something along the lines of (and pardon me if this is ridiculous, my xpath is rusty) //tr[preceding-sibling::tr/td/font/b]/td/text()

    Read the article

  • Looking for framework for plotting scientific data: 2d/3d ...

    - by Ivan
    I need to visualize some scientific calculations. I generally prefer reusing code if there is already a good available instead of inventing wheels each time, that's why I am asking. I need a C# code to draw charts (just outputting a bitmap is ok) of 2d (y=f(x)) and 3d (z=f(x,y)) digital data sets (where any axis can be float, int or datetime), sometimes combined. If I go here and click 3D in the navigation bar on the left, there I can see what I need. But the cheapest version costs $759 there, looks scary for a hobby project of an east-european student :-(

    Read the article

  • a small question on GNUPlot

    - by Robert
    Dear Guys, I have used the following statement to get the GNUPlot plot a grah for me: plot "force.dat" using 1:2 title "Detroit" with lines, \ "force.dat" u 1:3 t "US Avergae" w linepoints and the "force.dat" looks like 2005 0 0 2006 104 51 2007 202 101 It draws nice graph for me.However,I don't like the X-axis,because it is labelled as 2005,2005.5,2006,2006.5,2007..etc. However,those are year identifiers,I only want the 2005,2006,2007 etc,how could I get rid of the 2005.5,2006.5 etc labels in my GNUPlot graph? Thank you very much for your ideas.

    Read the article

  • after dragging up, animate viewport up and after dragging down, animate viewport down...

    - by Luis
    I been trying to make this work for the last couple of days, I'm a new into web designing so I hope someone can help me out with this. I'm trying to run an animation after dragging the div container depending if the user is dragging up or down. This is the code that Im working on. this is the code when calling the jquery widget $ $('#container').draggable({scroll:true, axis: 'y', //scrollSensitivity: 1000, stop: function(event, ui) { if(scrollY <= 0){ $('#container').animate({ top: '-2000px' }, 500); } if(scrollY -= 0){ $('#container').animate({ top: '0' }, 500); } } });

    Read the article

  • oralce + java encoding problem while insert

    - by Ahmad
    hi, I am kind of stuck on this one. im not a java or oracle guru, so please give detailed answers :) i've a web-service that inserts something into DB. the web-service is hosted on axis. the db is oracle with following properties: NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CHARACTERSET ZHS16GBK the web-service is hosted on windows server 2008, english version but i have changed the locale of the system to chinese now the data after insert has encoding problem and shows strange characters like ????,exxk?? the jws file has GBK encoding. and the data that is inserted into the DB is hard-coded in the file [we are not reading it from REQUEST]

    Read the article

  • Android: make a scrollable custom view

    - by Martyn
    Hey, I've rolled my own custom view and can draw to the screen alright, but what I'd really like to do is set the measuredHeigh of the screen to, say, 1000px and let the user scroll on the Y axis, but I'm having problems doing this. Can anyone help? Here's some code: public class TestScreen extends Activity { CustomDrawableView mCustomDrawableView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mCustomDrawableView = new CustomDrawableView(this); setContentView(mCustomDrawableView); } } and public class CustomDrawableView extends View { public CustomDrawableView(Context context) { super(context); setVerticalScrollBarEnabled(true); setMinimumHeight(1000); } @Override protected void onDraw(Canvas canvas) { canvas.drawLine(...); // more drawing } } I've tried to override scrollTo, scrollBy, awakenScrollBars etc with a call to super but to no avail. Am I missing something silly, or am I making some fundamental mistake? Thank you in advance, Martyn

    Read the article

  • Issue with plotting daily data using ggplot

    - by user1723765
    I tried to plot daily data from 9 variables in ggplot, but the graph I get cannot handle the date variable properly. The x axis is unreadable and its impossible to read the plot. I'm guessing there's an issue with the handling of dates. Here's the data: https://dl.dropbox.com/u/22681355/su.csv Here's the code I've been using: su=read.csv(file="su.csv", head=TRUE) meltdf=melt(su) ggplot(meltdf, aes(x=Date, y=value, colour=variable, group=variable))+geom_line() and here's the output: https://dl.dropbox.com/u/22681355/output.jpg here's the same plot done in excel, why does it look completely different?

    Read the article

  • How can I make a group bar plot in ggplot2?

    - by maximusyoda
    I have four of these kind of dataframes each with a different name (Apple,Ball,Cat) with different values of frequency but same 4 season names Seasons Frequency DJF 9886 JJA 5408 MAM 12876 SON 6932 And I am trying to make a group bar plot. The graph I'm looking for is like this, where c,d,e,f will be the names - Apple, Ball, Cat. Y-axis will be Frequency Each group will have 4 bars: DJF,JJA,MAM,SON Filled by seasons The number of Frequency written above the bar plot. How can I format the data to make it suitable for ggplot (cbind, melt etc) and use it in ggplot?

    Read the article

  • MATLAB: How do I get 3D coordiantes from a user-click?

    - by John
    I'm using Matlab to create a small chess game for one of my courses this semester. The thing I'm having trouble with is having the user be able to select one of the chess pieces. To simplify things, I'm making it so that the user selects a piece by clicking on the square that the chess piece resides on rather than clicking the piece itself (which I assume would be much more difficult). I know how to get the x and y coordinates of the view-port, but how do I transform these coordinates into 3-space coordinates? I know that there are multiple x,y,z coordinates associated with each view-port coordinate, but I'm only interested in the x,y,z coordinate where z = 0 (since the board itself is in the x,y plane that intersects the z axis where z = 0). Thanks!

    Read the article

  • How to write web services in java

    - by gurupriyan.e
    Though this might appear as a duplicate of Java Web Services , I would like to know Where to start and to continue.In the past, I have invested so much of time to find where to start but I wasn't able to. There are so many jargons and chaos (at least for me!) while reading the pages about web services. There are so many terms - like JAX-RPC, JAX-WS, Axis, Rest, Servlet as WebService, EJB's as Web Service and other terms that I don't know. Can this User group consolidate and give a highlevel overview of Java Web Services which is easy to understand and follow? I appreciate your kindness and thanks for your help.

    Read the article

  • How can I plot a time series graph with Perl?

    - by Jazz
    I have some data from a database (SQLite), mapping a value (an integer) to a date. A date is a string with this format: YYYY-MM-DD hh:mm. The dates are not uniformly distributed. I want do draw a line graph with the dates on X and the values on Y. What is the easiest way to do this with Perl? I tried DBIx::Chart but I could not make it recognize my dates. I also tried GD::Graph, but as the documentation says: GD::Graph does not support numerical x axis the way it should. Data for X axes should be equally spaced

    Read the article

  • silverlight drag move delta

    - by Notter
    Hi, this should be pretty simple, but i forgot how to do it... I've got a Border on a canvas, and i want to be able to move it around. i could do this easily with the MouseDragElementBehavior. but i don't want smooth movment, i want to to jump on the Y axis in an offset of 30. and on the X in 193. And it's done in MVVM, so i guess i should implement it as a behavior, right? anyway, how do i do this?

    Read the article

  • Search Result displaying-like google php

    - by Ramesh
    i have an paragraph and user will search inside that and if the search term has 3 matches inside but all are in 3 different places ex World War II, or the Second World War[1] (often abbreviated WWII or WW2), was a global military conflict lasting from 1939 to 1945 which involved most of the world's nations, including all of the great powers, organised into two opposing military alliances: the Allies and the Axis. It was the most widespread war in history, with more than 100 million military personnel mobilised. In a state of "total war," the major participants placed their entire economic, industrial, and scientific capabilities at the service of the war effort, erasing the distinction between civilian and military resources. Marked by significant action against civilians, including the Holocaust and the only use of nuclear weapons in warfare, it was the deadliest conflict in human history,[2] with over seventy million casualties. i have to search "war" so that it should display like World War II, or the Second World War[1].....In a state of "totalwar,".... some thing like this ///

    Read the article

  • Workaround for PHP SOAP request failure when wsdl defines service port binding as https and port 80?

    - by scooterhanson
    I am consuming a SOAP web service using php5's soap extension. The service' wsdl was generated using Axis java2wsdl, and whatever options are used during generation result in the port binding url being listed as https://xxx.xxx.xxx.xxx**:80** If I download the wsdl to my server, remove the port 80 specification from the port binding location value, and reference the local file in my soapclient call it works fine. However, if I try to reference it remotely (or download it and reference it locally, as-is) the call fails with a soap fault. I have no input into the service side so I can't make them change their wsdl-generation process. So, unless there's a way to make the soapclient ignorant of the port, I'm stuck with using a locally modified copy of someone else' wsdl (which I'd rather not do). Any thoughts on how to make my soapclient ignore the port 80?

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >