Search Results

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

Page 3/64 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • possible to constrain jQuery resize to x or y axis, like drag constrain?

    - by Tim
    This jQuery lets you constrain drag movement so it occurs only on the axis specified: $("#draggable2").draggable({ axis: 'x' }); See: http://jqueryui.com/demos/draggable/#constrain-movement This is not legal jQuery but I wish it were: $("#Container").resizable({ minHeight: 150, containment: {axis:'y' } }); Is it possible to prevent the user from making #Container wider while allowing her to make it taller? Thanks

    Read the article

  • Can I include both Apache Axis 1 and 2 libraries in the same project?

    - by ian_scho_es
    If it sounds like a ridiculous idea then it is. The client only wants to have to install one project on their server. Our web service will be bridging between mobile phones and various SOAP services made in .NET, Apache Axis 1 and 2, which rely on standards to transfer files such as MTOM and DIME. I am looking for an 'architecture' trick, such as develop the Axis 1 calls in a separate project and compile as a jar, to then pass it into the Axis 2 project.... Hmmm. Anything rather than having to download the source code for Axis 1 & 2 and compile them using the same xml libraries, etc. "It can't be done" is an acceptable answer. Thanks!

    Read the article

  • Z axis in isometric tilemap

    - by gyhgowvi
    I'm experimenting with isometric tile maps in JavaScript and HTML5 Canvas. I'm storing tile map data in JavaScript 2D array. // 0 - Grass // 1 - Dirt // ... var mapData = [ [0, 0, 0, 0, 0], [0, 0, 1, 0, 0, ... ] and draw for(var i = 0; i < mapData.length; i++) { for(var j = 0; j < mapData[i].length; j++) { var p = iso2screen(i, j, 0); // X, Y, Z context.drawImage(tileArray[mapData[i][j]], p.x, p.y); } } but this function mean's all tile Z axis is equal to zero. var p = iso2screen(i, j, 0); Maybe anyone have idea and how to do something like mapData[0][0] Z axis equal to 3 mapData[5][5] Z axis equal to 5? I have idea: Write function for grass, dirt and store this function to 2D array and draw and later mapData[0][0].setZ(3); But it is good idea to write functions for each tiles?

    Read the article

  • Trouble with SAT style vector projection in C#/XNA

    - by ssb
    Simply put I'm having a hard time working out how to work with XNA's Vector2 types while maintaining spatial considerations. I'm working with separating axis theorem and trying to project vectors onto an arbitrary axis to check if those projections overlap, but the severe lack of XNA-specific help online combined with pseudo code everywhere that omits key parts of the algorithm, googling has left me little help. I'm aware of HOW to project a vector, but the way that I know of doing it involves the two vectors starting from the same point. Particularly here: http://www.metanetsoftware.com/technique/tutorialA.html So let's say I have a simple rectangle, and I store each of its corners in a list of Vector2s. How would I go about projecting that onto an arbitrary axis? The crux of my problem is that taking the dot product of say, a vector2 of (1, 0) and a vector2 of (50, 50) won't get me the dot product I'm looking for.. or will it? Because that (50, 50) won't be the vector of the polygon's vertex but from whatever XNA calculates. It's getting the calculation from the right starting point that's throwing me off. I'm sorry if this is unclear, but my brain is fried from trying to think about this. I need a better understanding of how XNA calculates Vector2s as actual vectors and not just as random points.

    Read the article

  • Separating merged array of arithmetic and geometric series [closed]

    - by user1814037
    Possible Duplicate: Separating merged array of arithmetic and geometric series My friend asked me an interseting question. Given an array of positive integers in increasing order. Seperate them in two series, an arithmetic sequence and geometric sequence. The given array is such that a solution do exist. The union of numbers of the two sequence must be the given array. Both series can have common elements i.e. series need not to be disjoint. The ratio of the geometric series can be fractional. Example: Given series : 2,4,6,8,10,12,25 AP: 2,4,6,8,10,12 GP: 4,10,25 I tried taking few examples but could not reach a general way. Even tried some graph implementation by introducing edges if they follow a particular sequence but could not reach solution.

    Read the article

  • rotating model around own Y-axis XNA

    - by ChocoMan
    I'm have trouble with my model rotating around it's own Y-axis. The model is a person. When I test my world, the model is loaded at a position of 0, 0, 0. When I rotate my model from there, the model rotates like normal. The problem comes AFTER I moved the model to a new position. If I move the the model forward, left, etc, then try to rotate it on it's own Y-Axis, the model will rotate, but still around the original position in a circular manner (think of yourself swing around on a rope, but always facing outward from the center). Does anyone know how to keep the center point of rotation updated?

    Read the article

  • Swapping axis labels between 2D and 3D coordinates

    - by Will
    My game world is 3D. The map is only 2D, however. It is natural to think of the map as having an X and Y axis. And it is natural to think of the world has having an X, Y and Z axis, where Y is upwards. That is to say, X Y in 2D map coordinates is X Z in 3D coordinates. What conventions and approaches do you have to keeping things straight at a code level to make mapping between them natural? (Is Y usually upwards in 3D? Or do you have X and Z in map coordinates, or?)

    Read the article

  • Y Axis inverted on vertex output

    - by Yonathan Klijnsma
    I've got my project running and somehow it seems my vertex y components are inverted. 10 in the positive on Y goes down and 10 negative on the Y axis goes up. I can't find anything with the initialization and I am not doing any negative scaling in the view matrix. I've never had something like this happen before, does anyone have some tips or things to look for ? How I am sending verteces to the GPU ( Currently intermediate mode ) glVertex3f( x_pos_n, 10, z_pos ); I am using CG in the project but even without shaders the Y axis seems to be inverted.

    Read the article

  • Deploying web services on a RHEL 5 box using Apache/Tomcat/Axis/Java.

    - by Deepak Konidena
    Hi, I am new to the Web services scene. I currently have access to a RHEL5 box and i need to deploy a java web service on it. It runs apache and i know this because i have a website hosted on this machine. Now, i want to deploy a web service on to this website to be able to just pass a link to someone when they need to access my web service. Could someone point out a resource or explain what all i need to get the webservice deployed using Tomcat/Apache Axis and Java. I have done this on Windows (hosted on localhost) but couldn't quite figure out things on linux. Any help is greatly appreciated. Thanks. Deepak.

    Read the article

  • How to translate along Z axis in OpenTK

    - by JeremyJAlpha
    I am playing around with an OpenGL sample application I downloaded for Xamarin-Android. The sample application produces a rotating colored cube I would simply like to edit it so that the rotating cube is translated along the Z axis and disappears into the distance. I modified the code by: adding an cumulative variable to store my Z distance, adding GL.Enable(All.DepthBufferBit) - unsure if I put it in the right place, adding GL.Translate(0.0f, 0.0f, Depth) - before the rotate functions, Result: cube rotates a couple of times then disappears, it seems to be getting clipped out of the frustum. So my question is what is the correct way to use and initialize the Z buffer and get the cube to travel along the Z axis? I am sure I am missing some function calls but am unsure of what they are and where to put them. I apologise in advance as this is very basic stuff but am still learning :P, I would appreciate it if anyone could show me the best way to get the cube to still rotate but to also move along the Z axis. I have commented all my modifications in the code: // This gets called when the drawing surface is ready protected override void OnLoad (EventArgs e) { // this call is optional, and meant to raise delegates // in case any are registered base.OnLoad (e); // UpdateFrame and RenderFrame are called // by the render loop. This is takes effect // when we use 'Run ()', like below UpdateFrame += delegate (object sender, FrameEventArgs args) { // Rotate at a constant speed for (int i = 0; i < 3; i ++) rot [i] += (float) (rateOfRotationPS [i] * args.Time); }; RenderFrame += delegate { RenderCube (); }; GL.Enable(All.DepthBufferBit); //Added by Noob GL.Enable(All.CullFace); GL.ShadeModel(All.Smooth); GL.Hint(All.PerspectiveCorrectionHint, All.Nicest); // Run the render loop Run (30); } void RenderCube () { GL.Viewport(0, 0, viewportWidth, viewportHeight); GL.MatrixMode (All.Projection); GL.LoadIdentity (); if ( viewportWidth > viewportHeight ) { GL.Ortho(-1.5f, 1.5f, 1.0f, -1.0f, -1.0f, 1.0f); } else { GL.Ortho(-1.0f, 1.0f, -1.5f, 1.5f, -1.0f, 1.0f); } GL.MatrixMode (All.Modelview); GL.LoadIdentity (); Depth -= 0.02f; //Added by Noob GL.Translate(0.0f,0.0f,Depth); //Added by Noob GL.Rotate (rot[0], 1.0f, 0.0f, 0.0f); GL.Rotate (rot[1], 0.0f, 1.0f, 0.0f); GL.Rotate (rot[2], 0.0f, 1.0f, 0.0f); GL.ClearColor (0, 0, 0, 1.0f); GL.Clear (ClearBufferMask.ColorBufferBit); GL.VertexPointer(3, All.Float, 0, cube); GL.EnableClientState (All.VertexArray); GL.ColorPointer (4, All.Float, 0, cubeColors); GL.EnableClientState (All.ColorArray); GL.DrawElements(All.Triangles, 36, All.UnsignedByte, triangles); SwapBuffers (); }

    Read the article

  • Collision Detection with SAT: False Collision for Diagonal Movement Towards Vertical Tile-Walls?

    - by Macks
    Edit: Problem solved! Big thanks to Jonathan who pointed me in the right direction. Sean describes the method I used in a different thread. Also big thanks to him! :) Here is how I solved my problem: If a collision is registered by my SAT-method, only fire the collision-event on my character if there are no neighbouring solid tiles in the direction of the returned minimum translation vector. I'm developing my first tile-based 2D-game with Javascript. To learn the basics, I decided to write my own "game engine". I have successfully implemented collision detection using the separating axis theorem, but I've run into a problem that I can't quite wrap my head around. If I press the [up] and [left] arrow-keys simultaneously, my character moves diagonally towards the upper left. If he hits a horizontal wall, he'll just keep moving in x-direction. The same goes for [up] and [left] as well as downward-diagonal movements, it works as intended: http://i.stack.imgur.com/aiZjI.png Diagonal movement works fine for horizontal walls, for both left and right-movement However: this does not work for vertical walls. Instead of keeping movement in y-direction, he'll just stop as soon as he "enters" a new tile on the y-axis. So for some reason SAT thinks my character is colliding vertically with tiles from vertical walls: http://i.stack.imgur.com/XBEKR.png My character stops because he thinks that he is colliding vertically with tiles from the wall on the right. This only occurs, when: Moving into top-right direction towards the right wall Moving into top-left direction towards the left wall Bottom-right and bottom-left movement work: the character keeps moving in y-direction as intended. Is this inherited from the way SAT works or is there a problem with my implementation? What can I do to solve my problem? Oh yeah, my character is displayed as a circle but he's actually a rectangular polygon for the collision detection. Thank you very much for your help.

    Read the article

  • Is it possible to deploy a SOAP server with Axis without using WSDD?

    - by Alceu Costa
    In the project I am working I have deployed a SOAP server using Deployment Descriptors (WSDD) files. To do that a webserver (e.g tomcat, jetty) is started and then the following command is executed: java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient deploy.wsdd What I need is to skip the above command to avoid a call to the Axis AdminClient. Is it possible to deploy my webservice as war file? Note: A solution with JWS can't be used due to its limitations.

    Read the article

  • Narrow-phase collision detection algorithms

    - by Marian Ivanov
    There are three phases of collision detection. Broadphase: It loops between all objecs that can interact, false positives are allowed, if it would speed up the loop. Narrowphase: Determines whether they collide, and sometimes, how, no false positives Resolution: Resolves the collision. The question I'm asking is about the narrowphase. There are multiple algorithms, differing in complexity and accuracy. Hitbox intersection: This is an a-posteriori algorithm, that has the lowest complexity, but also isn't too accurate, Color intersection: Hitbox intersection for each pixel, a-posteriori, pixel-perfect, not accuratee in regards to time, higher complexity Separating axis theorem: This is used more often, accurate for triangles, however, a-posteriori, as it can't find the edge, when taking last frame in account, it's more stable Linear raycasting: A-priori algorithm, useful for semi-realistic-looking physics, finds the intersection point, even more accurate than SAT, but with more complexity Spline interpolation: A-priori, even more accurate than linear rays, even more coplexity. There are probably many more that I've forgot about. The question is, in when is it better to use SAT, when rays, when splines, and whether there is anything better.

    Read the article

  • Debugging Minimum Translation Vector

    - by SyntheCypher
    I implemented the minimum translation vector from codezealot's tutorial on SAT (Separating Axis Theorem) but I'm having an issue I can't quite figure out. Here's the example I have: As you can see in top and bottom left images regardless of the side the of the green car which red car is penetrating the MTV for the red car still remains as a negative number also here is the same example when the front of the red car is facing the opposite direction the number will always be positive. When the red car is past the half way through the green car it should switch polarity. I thought I'd compensated for this in my code, but apparently not either that or it's a bug I can find. Here is my function for finding and returning the MTV, any help would be much appreciated: Code

    Read the article

  • Axis Aligned Billboard: how to make the object look at camera

    - by user19787
    I am trying to make an Axis Aligned Billboard with Pyglet. I have looked at several tutorials, but they only show me how to get the Up,Right,and Look vectors. So far this is what I have: target = cam.pos look = norm( target - billboard.pos ) right = norm( Vector3(0,1,0)*look ) up = look*right gluLookAt( look.x, look.y, look.z, self.pos.x, self.pos.y, self.pos.z, up.x, up.y, up.z ) This does nothing for me visibly. Any idea what I'm doing wrong?

    Read the article

  • How do I implement camera axis aligned billboards?

    - by user19787
    I am trying to make an axis-aligned billboard with Pyglet. I have looked at several tutorials, but they only show me how to get the up, right, and look vectors. So far this is what I have: target = cam.pos look = norm(target - billboard.pos) right = norm(Vector3(0,1,0) * look) up = look * right gluLookAt( look.x, look.y, look.z, self.pos.x, self.pos.y, self.pos.z, up.x, up.y, up.z ) This does nothing for me visibly. Any idea what I'm doing wrong?

    Read the article

  • How can I solve this SAT edge case?

    - by ssb
    I have an SAT implementation that basically works, and the fact that it works is what's giving me a few headaches. Basically there are some situations where using the SAT doesn't quite give me my intended result. One of these involves movement across multiple collision objects. Or to put it another way, if I have several collision boxes lined up next to each other such as to create something like a wall or a floor, movement along that surface while constantly applying force into that surface sometimes causes hangups, i.e. the player stops moving. This illustration shows what I mean: The 2 boxes on the bottom represent a floor, and the box on top/in the middle represents what my player is doing. There are several squares lined up as world obstacles to create some kind of wall, and if I move to the left across this surface while holding the down key then the issue arises. It only happens at the exact dividing point between two blocks. It only happens when moving to the left. At any rate I think I know why it happens, but I don't know how to solve it. Basically when I update my player movement I consider which directions are pressed, naturally, so if down is pressed I will add the speed to the Y component, and so on. But due to the way my SAT is implemented, when the penetration into the shape is the same from both sides it just goes with the smallest axis that it finds first, and it checks collisions against objects in the order that they were created because it goes through a foreach loop on the list of collidable objects. So this all adds up to the effect of if I'm moving to the left over a series of boxes while holding down, it will resolve me back to the right out of the first box and then up out of the box to the right of it, and this continues as long as the penetration is the same. The odd part is that this doesn't happen every time, which I am going to attribute to some oddity regarding multiplying velocity by the game time and causing some minor discrepancies between the lengths. Ultimately what this boils down to is that it will keep resolving me to the right and up, but this is technically expected behavior. All the solutions I can think of only address the symptoms of this problem and not the actual cause, such as not using many blocks to create walls or shapes, which is an option I'd like to keep open. I could also change which axis my algorithm defaults to, but that would just cause problems when going up/down along the walls. What can I do to fix this?

    Read the article

  • Rotating Sprite around Y-Axis (2D)

    - by Bruce Collie
    I'm going to be creating a game soon, and part of it involves spinning sprites. The sprites will be spinning around the Y-Axis (imagine a spinning plate on top of a stick, where the stick stands up vertically. The main way I've thought of is to have a series of sprites for various rotation values that I blur between as the 'plate' rotates (the sprite is more complex than a plate, though). The game will be for iPhone, but I'm open to using any 2D gave development library for it.

    Read the article

  • Axis webservice calls fail sometimes, access.log shows content!

    - by epischel
    Hi, our app is a webservice client (axis 1) to a third party webservice (also axis 1). We use it for some years now. Since a few weeks, we (as a client) get sometimes HTTP status 400 (bad request) or read timeouts when calling the webservice. Strangely, the access.log of the service shows part of the request or the response instead of the URL. It looks like this (looks like the end of the request string) x.x.x.x -> y.y.y.y:8080 - - [timestamp] "POST /webservice HTTP/1.0" 200 16127 0 x.x.x.x -> y.y.y.y:8080 - - [timestamp] "POST /webservice HTTP/1.0" 200 22511 1 x.x.x.x -> y.y.y.y:8080 - - [timestamp] "il=\"true\"/><nsl:text xsi:type=\"xsd:string\" xsi:nil=\"true\"/></SOAPSomeOperation></soapenv:Body></soapenv:Envelope> Axis/1.4" 400 299 0 or (some string out of the what looks like the request) x.x.x.x -> y.y.y.y:8080 - - [timestamp] ":string\">some text</sometag><othertag>moretext" 400 299 0 or in some other cases it looks like two requests thrown together (... means xml string left out): x.x.x.x -> y.y.y.y:8080 - - [timestamp] "...</someop></soapenv:Body></soapenv:Envelope>:xsd=\"http://www.w3.org/2001/XMLSchema\"...</soapenv:Body></soapenv:Envelope>" 400 299 0 Application log does not give any hints. Frequency of such call is 1% of all calls to that service. The only discriminator I know of so far is that it happens since operations informed us that the service url changed because of "server migration". Has anyone experienced such phenomenon yet? Has somebody got an idea whats wrong and how to fix? Thanks,

    Read the article

  • My pivot chart has the wrong Y axis values but correct data point values

    - by Mark Harnett
    I created a pivot chart based on some raw data for the x axis (dates) and 4 calculated fields for the Y values. The values on resulting lines are correct (see the data label at the end of the line) but the Y axis is off by about 100, but not off by any consistent amount. I have played with auto axis on and off, turn log scale on and off. All to no avail. Does anybody have any thoughts? Image link

    Read the article

  • transition of x-axis results in overflow

    - by peter
    First of all, no: this question is not about the (yet) ugly transition of the lines (I might open another one for that, though..). I'm displaying data in line charts and the user can select the time horizon. The x-axis then correspondingly transitions so as to fit to the changed time horizon. In attached image, e.g., the time horizon was 1 week and then I switched to 4 weeks. The number of ticks on the x-axis increases from 7 to 28, correspondingly. Question: How can I prevent the x-axis animation to display outside the svg container? As you can see, the additional dates fly in from the left and they are being animated far far outside the container. Any ideas? Right now, the transition works probably in the most simple way it could: // format for x-axis var xAxis = d3.svg.axis() .scale(x) .orient("bottom") .tickFormat(d3.time.format("%d.%m")) .ticks(d3.time.days, 1) .tickSubdivide(0); // Update x-axis svg.select(".x") .transition() .duration(500) .call(xAxis);

    Read the article

  • Translate along local axis

    - by Aaron
    I have an object with a position matrix and a rotation matrix (derived from a quaternion, but I digress). I'm able to translate this object along world-relative vectors, but I'm trying to figure out how to translate it along local-relative vectors. So if the object is tilted 45 degrees around its Z-axis the vector (1, 0, 0) would make it move to the upper right. For world-space translations I simply turn the movement vector into a matrix and multiply it by the position matrix: position_mat = translation_mat * position_mat. For local-space translations I'd think I'd have to use the rotation matrix into that formula, but I see the object spin around instead when I apply a translation over time no matter where I multiply the rotation matrix.

    Read the article

  • How do i plot a vertical axis with variable intervals (Flex Charts or any other)

    - by satish
    How do i plot a vertical axis with variable intervals? on a Flex Chart. I want to plot a data set that has values from 0.1 to 800. When I use a standard Numerical Axis, I have to define a interval. I tried using Log-Axis, but I am not sure how to plot the point values. Looks like something in lines of semi-log axis would be better. A axis with initial values in Numerical, but later shifting gears to a Log-Axis. Any ideas or pointers to implement this in Flex?

    Read the article

  • Python, Matplotlib, subplot: How to set the axis range?

    - by someone
    How can I set the y axis range of the second subplot to e.g. [0,1000] ? The FFT plot of my data (a column in a text file) results in a (inf.?) spike so that the actual data is not visible. pylab.ylim([0,1000]) has no effect, unfortunately. This is the whole script: # based on http://www.swharden.com/blog/2009-01-21-signal-filtering-with-python/ import numpy, scipy, pylab, random xs = [] rawsignal = [] with open("test.dat", 'r') as f: for line in f: if line[0] != '#' and len(line) > 0: xs.append( int( line.split()[0] ) ) rawsignal.append( int( line.split()[1] ) ) h, w = 3, 1 pylab.figure(figsize=(12,9)) pylab.subplots_adjust(hspace=.7) pylab.subplot(h,w,1) pylab.title("Signal") pylab.plot(xs,rawsignal) pylab.subplot(h,w,2) pylab.title("FFT") fft = scipy.fft(rawsignal) #~ pylab.axis([None,None,0,1000]) pylab.ylim([0,1000]) pylab.plot(abs(fft)) pylab.savefig("SIG.png",dpi=200) pylab.show() Other improvements are also appreciated!

    Read the article

  • Apache Axis web service clients vs plain SOAP requests.

    - by Andy Pryor
    I'm looking for the best way to consume a Java web service that returns rather large and complex objects. I am currently using Apache Axis clients generated from the wsdl, (using eclipse "generate web service client" tool). We have concerns about performance of this. The service proxy objects are not thread safe, and they are rather heavy to instantiate, 2-3 MB on the JVM. The other alternative is making HTTP connections and building a String SOAP requests. I would have to interpret the response, and build objects from the XML. Would this be a better alternative to the heavy axis objects? I searched for good reading on this, if any one had any links I would greatly appreciate it.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >