Search Results

Search found 1220 results on 49 pages for 'axis'.

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

  • SRP & "axis of change"?

    - by lance
    I'm reading Bob Martin's principles of OOD, specifically the SRP text, and I understand the spirit of what it's saying pretty well, but I don't quite understand a particular phrasing, from page 2 of the link (page 150 of the book): I paraphrase: It is important to separate these two responsibilities into separate classes because each responsibility is an axis of change. What exactly is meant here by "axis of change"?

    Read the article

  • How can I solve this SAT direct corner intersection edge case?

    - by ssb
    I have a working SAT implementation, but I am running into a problem where direct collisions at a corner do not work for tiled surfaces. That is, it clips on the surface when going in a certain direction because it gets hung up on one of the tiles, and so, for example, if I walk across a floor while holding both down and left, the player will stop when meeting the next shape because the player will be colliding with the right side rather than with the top of the floor tile. This illustration shows what I mean: The top block will translate right first and then up. I have checked here and here which are helpful, but this does not address what I should do in a situation where I don't have a tile-based world. My usage of the term "tile" before isn't really accurate since what I'm doing here is manually placing square obstacles next to each other, not assigning them spots on a grid. What can I do to fix this?

    Read the article

  • AABB vs OBB Collision Resolution jitter on corners

    - by patt4179
    I've implemented a collision library for a character who is an AABB and am resolving collisions between AABB vs AABB and AABB vs OBB. I wanted slopes for certain sections, so I've toyed around with using several OBBs to make one, and it's working great except for one glaring issue; The collision resolution on the corner of an OBB makes the player's AABB jitter up and down constantly. I've tried a few things I've thought of, but I just can't wrap my head around what's going on exactly. Here's a video of what's happening as well as my code: Here's the function to get the collision resolution (I'm likely not doing this the right way, so this may be where the issue lies): public Vector2 GetCollisionResolveAmount(RectangleCollisionObject resolvedObject, OrientedRectangleCollisionObject b) { Vector2 overlap = Vector2.Zero; LineSegment edge = GetOrientedRectangleEdge(b, 0); if (!SeparatingAxisForRectangle(edge, resolvedObject)) { LineSegment rEdgeA = new LineSegment(), rEdgeB = new LineSegment(); Range axisRange = new Range(), rEdgeARange = new Range(), rEdgeBRange = new Range(), rProjection = new Range(); Vector2 n = edge.PointA - edge.PointB; rEdgeA.PointA = RectangleCorner(resolvedObject, 0); rEdgeA.PointB = RectangleCorner(resolvedObject, 1); rEdgeB.PointA = RectangleCorner(resolvedObject, 2); rEdgeB.PointB = RectangleCorner(resolvedObject, 3); rEdgeARange = ProjectLineSegment(rEdgeA, n); rEdgeBRange = ProjectLineSegment(rEdgeB, n); rProjection = GetRangeHull(rEdgeARange, rEdgeBRange); axisRange = ProjectLineSegment(edge, n); float axisMid = (axisRange.Maximum + axisRange.Minimum) / 2; float projectionMid = (rProjection.Maximum + rProjection.Minimum) / 2; if (projectionMid > axisMid) { overlap.X = axisRange.Maximum - rProjection.Minimum; } else { overlap.X = rProjection.Maximum - axisRange.Minimum; overlap.X = -overlap.X; } } edge = GetOrientedRectangleEdge(b, 1); if (!SeparatingAxisForRectangle(edge, resolvedObject)) { LineSegment rEdgeA = new LineSegment(), rEdgeB = new LineSegment(); Range axisRange = new Range(), rEdgeARange = new Range(), rEdgeBRange = new Range(), rProjection = new Range(); Vector2 n = edge.PointA - edge.PointB; rEdgeA.PointA = RectangleCorner(resolvedObject, 0); rEdgeA.PointB = RectangleCorner(resolvedObject, 1); rEdgeB.PointA = RectangleCorner(resolvedObject, 2); rEdgeB.PointB = RectangleCorner(resolvedObject, 3); rEdgeARange = ProjectLineSegment(rEdgeA, n); rEdgeBRange = ProjectLineSegment(rEdgeB, n); rProjection = GetRangeHull(rEdgeARange, rEdgeBRange); axisRange = ProjectLineSegment(edge, n); float axisMid = (axisRange.Maximum + axisRange.Minimum) / 2; float projectionMid = (rProjection.Maximum + rProjection.Minimum) / 2; if (projectionMid > axisMid) { overlap.Y = axisRange.Maximum - rProjection.Minimum; overlap.Y = -overlap.Y; } else { overlap.Y = rProjection.Maximum - axisRange.Minimum; } } return overlap; } And here is what I'm doing to resolve it right now: if (collisionDetection.OrientedRectangleAndRectangleCollide(obb, player.PlayerCollision)) { var resolveAmount = collisionDetection.GetCollisionResolveAmount(player.PlayerCollision, obb); if (Math.Abs(resolveAmount.Y) < Math.Abs(resolveAmount.X)) { var roundedAmount = (float)Math.Floor(resolveAmount.Y); player.PlayerCollision._position.Y -= roundedAmount; } else if (Math.Abs(resolveAmount.Y) <= 30.0f) //Catch cases where the player should be able to step over the top of something { var roundedAmount = (float)Math.Floor(resolveAmount.Y); player.PlayerCollision._position.Y -= roundedAmount; } else { var roundedAmount = (float)Math.Floor(resolveAmount.X); player.PlayerCollision._position.X -= roundedAmount; } } Can anyone see what might be the issue here, or has anyone experienced this before that knows a possible solution? I've tried for a few days to figure this out on my own, but I'm just stumped.

    Read the article

  • How can I get accurate collision resolution on the corners of rectangles?

    - by ssb
    I have a working collision system implemented, and it's based on minimum translation vectors. This works fine in most cases except when the minimum translation vector is not actually in the direction of the collision. For example: When a rectangle is on the far edge on any side of another rectangle, a force can be applied, in this example down, the pushes one rectangle into the other, particularly a static object like a wall or a floor. As in the picture, the collision is coming from above, but because it's on the very edge, it translates to the left instead of back up. I've searched for a while to find an approach but everything I can find deals with general corner collisions where my problem is only in this one limited case. Any suggestions?

    Read the article

  • Excel chart: How to reverse the X axis of time series data

    - by JohnnyLambada
    In Excel 2003, I have a time series from a financial report that goes something like this: 2007 2006 2005 Amount 300 200 100 I want to create a graph of the time series that looks something like this (please excuse the ugly ascii graph): 300| .x | ... 200| .x.. | ... 100| x |____________________ 0 2005 2006 2007 But intead of getting an upward sloping graph, excel wants to put my time series in reverse (the way it actually appears in the spreadsheet). Is there any way to make excel display the x axis in reverse of the way it normally does? I've tried manually reversing the range in the chart dialog (changing a range of B1:D3 to D3:B1), but excel just puts it back.

    Read the article

  • Creating a fixed axis for Silverlight Toolkit charts

    - by Bill Jeeves
    Every example I see of a series in a Silverlight chart fromt he toolkit has a binding for bothe IndependentValueBinding and DependentValueBinding. In my code I want a fixed axis for the categories (Independent) - so every value get's "X" perhaps. Is there a way to do this? Essentially I have ten bar series in one chart and I want them all to sit together. It seems silly to create a new class to hold them in just so I can add a string property for the axis name.

    Read the article

  • Movement on the X an Z axis are combined?

    - by Magicaxis
    This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward). The Y axis works fine, but when I increment the object's X position, the object moves BOTH right and backwards! when I decrement X, left and forwards! setPosition(getPosition().X + 2/*times deltatime*/, getPosition().Y, getPosition().Z); I was astonished that XNA doesnt have its own setPosition function, so I made a parent class for all objects with a setPosition and Draw function. Setposition simply edits a variable "mPosition" and passes it to the common draw function: // Copy any parent transforms. Matrix[] transforms = new Matrix[block.Bones.Count]; block.CopyAbsoluteBoneTransformsTo(transforms); // Draw the model. A model can have multiple meshes, so loop. foreach (ModelMesh mesh in block.Meshes) { // This is where the mesh orientation is set, as well // as our camera and projection. foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.World = transforms[mesh.ParentBone.Index] * Matrix.CreateRotationY(MathHelper.ToRadians(mOrientation.Y)) * Matrix.CreateTranslation(mPosition); effect.View = game1.getView(); effect.Projection = game1.getProjection(); } // Draw the mesh, using the effects set above. mesh.Draw(); } I tried to work it out by attempting to increment and decrement the Z axis, but nothing happens?! So using the X axis changes the objects x and z axis', but changing the Z does nothing. Great. So how do I seperate the X and Z axis movement?

    Read the article

  • plot negative and positive values in same Y-axis in coreplot ios

    - by user3774439
    I have an issue in converting axis labels to int or float values. This is my Y-Axis. It contains temperature values contains -50, 33, 117, 200. CPTXYAxis *y = axisSet.yAxis; y.labelingPolicy = CPTAxisLabelingPolicyNone; y.orthogonalCoordinateDecimal = CPTDecimalFromUnsignedInteger(1); y.majorGridLineStyle = majorGridLineStyle; y.minorGridLineStyle = minorGridLineStyle; y.minorTicksPerInterval = 0.0; y.labelOffset = 0.0; y.title = @""; y.titleOffset = 0.0; NSMutableSet *yLabels = [NSMutableSet setWithCapacity:4]; NSMutableSet *yLocations = [NSMutableSet setWithCapacity:4]; NSArray *yAxisLabels = [NSArray arrayWithObjects:@"-50", @"33", @"117", @"200", nil]; NSNumberFormatter * nFormatter = [[NSNumberFormatter alloc] init]; [nFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; for ( NSUInteger i = 0; i < [yAxisLabels count]; i++ ) { NSLog(@"%@",[yAxisLabels objectAtIndex:i]); CPTAxisLabel *label = [[CPTAxisLabel alloc] initWithText:[NSString stringWithFormat:@"%@",[yAxisLabels objectAtIndex:i]] textStyle:axisTextStyle]; label.tickLocation = CPTDecimalFromUnsignedInteger(i); label.offset = y.majorTickLength; if (label) { [yLabels addObject:label]; [yLocations addObject:[NSDecimalNumber numberWithUnsignedInteger:i]]; } label = nil; } y.axisLabels = yLabels; y.majorTickLocations = yLocations; y.labelFormatter = nFormatter; Now, my issue is.. I am getting data from the BLE device as temperature values as strings like 50, 60.3, etc... Now I want plot these values from BLE device with the Y-axis values. i am unable convert these Y-axis labels to temperature values. Could you please help me guys...I have tried many time still no luck. Please help me UPDATE:: This is the way I am creating scatterplot: -(void)createScatterPlotsWithIdentifier:(NSString *)identifier color:(CPTColor *)color forGraph:(CPTGraph *)graph forXYPlotSpace:(CPTXYPlotSpace *)plotSpace{ CPTScatterPlot *scatterPlot = [[CPTScatterPlot alloc] init]; scatterPlot.dataSource = self; scatterPlot.identifier = identifier; //Plot a graph with in the plotspace [plotSpace scaleToFitPlots:[NSArray arrayWithObjects:scatterPlot, nil]]; plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromUnsignedInteger(0) length:CPTDecimalFromUnsignedInteger(30)]; plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromUnsignedInteger(-50) length:CPTDecimalFromUnsignedInteger(250)]; CPTMutablePlotRange *xRange = [[self getCoreplotSpace].xRange mutableCopy]; [xRange expandRangeByFactor:CPTDecimalFromCGFloat(-1)]; [self getCoreplotSpace].xRange = xRange; CPTMutableLineStyle *scatterLineStyle = [scatterPlot.dataLineStyle mutableCopy]; scatterLineStyle.lineWidth = 1; scatterLineStyle.lineColor = color; scatterPlot.dataLineStyle = scatterLineStyle; CPTMutableLineStyle *scatterSymbolLineStyle = [CPTMutableLineStyle lineStyle]; scatterSymbolLineStyle.lineColor = color; CPTPlotSymbol *scatterSymbol = [CPTPlotSymbol ellipsePlotSymbol]; scatterSymbol.fill = [CPTFill fillWithColor:color]; scatterSymbol.lineStyle = scatterSymbolLineStyle; scatterSymbol.size = CGSizeMake(2.0f, 2.0f); scatterPlot.plotSymbol = scatterSymbol; [graph addPlot:scatterPlot toPlotSpace:plotSpace]; } Configuring the Y-axis like this: NSMutableSet *yLabels = [NSMutableSet setWithCapacity:4]; NSMutableSet *yLocations = [NSMutableSet setWithCapacity:4]; NSArray *yAxisLabels = [NSArray arrayWithObjects:@"-50", @"33", @"117", @"200", nil]; NSArray *customTickLocations = [NSArray arrayWithObjects:[NSDecimalNumber numberWithUnsignedInt:-50], [NSDecimalNumber numberWithInt:33], [NSDecimalNumber numberWithInt:117], [NSDecimalNumber numberWithInt:200],nil]; for ( NSUInteger i = 0; i < [yAxisLabels count]; i++ ) { NSLog(@"%@",[yAxisLabels objectAtIndex:i]); CPTAxisLabel *label = [[CPTAxisLabel alloc] initWithText:[NSString stringWithFormat:@"%@",[yAxisLabels objectAtIndex:i]] textStyle:axisTextStyle]; label.tickLocation = CPTDecimalFromInteger([[customTickLocations objectAtIndex:i] integerValue]); label.offset = y.majorTickLength; if (label) { [yLabels addObject:label]; [yLocations addObject:[NSString stringWithFormat:@"%d",[[customTickLocations objectAtIndex:i] integerValue]]]; } label = nil; } y.axisLabels = yLabels; y.majorTickLocations = [NSSet setWithArray:customTickLocations]; Eric, I set the range as you said in CreateSctterPlot method. But In horizontal line on graph are not coming. Could you please help me what I am wrong. Thanks

    Read the article

  • open flash chart rails x-axis issue

    - by Jimmy
    Hey guys, I am using open flash chart 2 in my rails application. Everything is looking smooth except for the range on my x axis. I am creating a line to represent cell phone plan cost over a specific amount of usage and I'm generate 8 values, 1-5 are below the allowed usage while 6-8 are demonstrations of the cost for usage over the limit. The problem I'm encountering is how to set the range of the X axis in ruby on rails to something specific to the data. Right now the values being displayed are the indexes of the array that I'm giving. When I try to hand a hash to the values the chart doesn't even load at all. So basically I need help getting a way to set the data for my line properly so that it displays correctly, right now it is treating every value as if it represents the x value of the index of the array. Here is a screen shot which may be a better description than what I am saying: http://i163.photobucket.com/albums/t286/Xeno56/Screenshot.png Note that those values are correct just the range on the x-axis is incorrect, it should be something like 100, 200, 300, 400, 500, 600, 700 Code: y = YAxis.new y.set_range(0,100, 20) x_legend = XLegend.new("Usage") x_legend.set_style('{font-size: 20px; color: #778877}') y_legend = YLegend.new("Cost") y_legend.set_style('{font-size: 20px; color: #770077}') chart =OpenFlashChart.new chart.set_x_legend(x_legend) chart.set_y_legend(y_legend) chart.y_axis = y line = Line.new line.text = plan.name line.width = 2 line.color = '#006633' line.dot_size = 2 line.values = generate_data(plan) chart.add_element(line) def generate_data(plan) values = [] #generate below threshold numbers 5.times do |x| usage = plan.usage / 5 * x cost = plan.cost * 10 values << cost end #generate above threshold numbers 3.times do |x| usage = plan.usage + ((plan.usage / 5) * x) cost = plan.cost + (usage * plan.overage) values << cost end return values end

    Read the article

  • Laptop screen blank after login when external monitor is not connected

    - by Ramon Suarez
    Ubuntu does not switch back automatically to only monitor present when booting after disconnecting external monitor. Here's a video showing what happens. I get to the login window and everything looks ok, then I type my password, the desktop image shows up and... everything goes blank. It does not happen when I just login as a guest. When possible I work with my laptop connected to an external screen via the VGA port. The problem comes when I boot the computer without that secondary screen connected: The login screen comes out ok. After login the screen goes black, but I can hear the login sound. If I hit ctr + alt + backwards-delete and login again sometimes it is fixed, but not all. If I log in as a different user everything is OK. Then I log in as my user and sometimes it works. To have a screen I have to plug a monitor. Although I have turned on the laptop display with that monitor on, if I reboot it goes blank again after login, even if I turn off the external monitor before turning off the computer. I've managed to get my screen back with my username after going into recovery mode, but only sometimes. Failsafe would not load after second screen asking me what I wanted to do (no mouse to click nor keyboard working). My computer is a LDLC Aurore BB1-i5 -8 -S1. Which is the configuration file that keeps the information about the monitors using Displays under lightgdm and where is it? I guess if I could edit it I may have a chance :) One of the things I tried following a solution in another post was removing my monitors.xml file, but it does not work and I don't know how to create a good one that I could use now. When doing DISPLAY=:0 xrandrI get: Screen 0: minimum 320 x 200, current 320 x 200, maximum 8192 x 8192 LVDS1 connected (normal left inverted right x axis y axis) 1366x768 60.0 + 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) This is the full dmesg after activating sudo xdiagnoseas Bryce sugested. (If you tell me the relevant parts I will paste them here) When conecting the external monitor, only the external will work, although I can see using Displays that the computer thinks that both are working. I've asked the question in Launchpad but have it keeps on expiring without any feedback. In my opinion Ubuntu should be able to detect automatically that there is no external monitor present and switch to the laptop monitor. There's a similar question here, but it does not apply to my case External monitor set as primary even when disconnected from laptop Update: For clarification, the problem happens only with my user and once I log in. I even get to see the screensaver for about a second, and then it goes blank. Tried Bryce's example (see his answer below), but it did not work. This is the info I get from tty1 with Display=:0 xrandr: – Ramon Suarez Jul 9 at 16:36 Screen 0: minimum 320 x 200, current 320 x 200, maximum 8192 x 8192 LVDS1 connected (normal left inverted right x axis y axis) 1366x768 60.0 + 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis)

    Read the article

  • ExtJS 4 Chart Axis Display Issue in Chrome

    - by SerEnder
    I've run into an issue while using ExtJS 4.0.7. I'm trying to display a chart with two series on a Numeric/Category Chart. The chart displays correctly in Firefox, but while using Chrome (18.0.1025.142) the x axis labels are either all stacked upon each or else (when using rotate) rendered behind the chart in the specified angle. Any ideas would be appreciated. Screen shot in Firefox: Screen Shot in Chrome: And the code that's used to generate both: Ext.require(['Ext.chart.*']); Ext.onReady(function() { var iChartWidth = 800; // Defines chart width var iChartHeight = 550; // Defines chart height Ext.define('RulesCreatedModel',{ extend:'Ext.data.Model', fields:[ {name:'sHourName', type:'string'}, {name:'User_2', type:'number'}, {name:'User_1', type:'number'}, ] }); var RulesCreatedStore = Ext.create('Ext.data.Store',{ id:'RulesCreatedStore', model:'RulesCreateModel', fields: [ 'sHourName','dayNum','hour','User_2','User_1'], data:[{ 'sHourName':'3pm', 'User_1':82, 'User_2':56 },{ 'sHourName':'4pm', 'User_1':39, 'User_2':44 },{ 'sHourName':'5pm', 'User_1':80, 'User_2':14 },{ 'sHourName':'6pm', 'User_1':55, 'User_2':0, },{ 'sHourName':'7pm', 'User_1':36, 'User_2':0, },{ 'sHourName':'8pm', 'User_1':66, 'User_2':0 },{ 'sHourName':'9pm', 'User_1':39, 'User_2':0, },{ 'sHourName':'10pm', 'User_1':0, 'User_2':0 },{ 'sHourName':'11pm', 'User_1':0, 'User_2':0 },{ 'sHourName':'12am', 'User_1':0, 'User_2':0 },{ 'sHourName':'1am', 'User_1':0, 'User_2':0 },{ 'sHourName':'2am', 'User_1':0, 'User_2':0 },{ 'sHourName':'3am', 'User_1':0, 'User_2':0 },{ 'sHourName':'4am', 'User_1':0, 'User_2':0 },{ 'sHourName':'5am', 'User_1':0, 'User_2':0 },{ 'sHourName':'6am', 'User_1':0, 'User_2':0 },{ 'sHourName':'7am', 'User_1':0, 'User_2':1 },{ 'sHourName':'8am', 'User_1':0, 'User_2':99 },{ 'sHourName':'9am', 'User_1':0, 'User_2':28 },{ 'sHourName':'10am', 'User_1':0, 'User_2':28 },{ 'sHourName':'11am', 'User_1':0, 'User_2':153 },{ 'sHourName':'12pm', 'User_1':0, 'User_2':58 },{ 'sHourName':'1pm', 'User_1':0, 'User_2':42 },{ 'sHourName':'2pm', 'User_1':20, 'User_2':10 }] }); Ext.create('Ext.chart.Chart',{ id: 'RulesWrittenChart', renderTo: 'StatCharts_Display', width: iChartWidth, height: iChartHeight, animate: true, store: RulesCreatedStore, axes: [{ type: 'Numeric', position: 'left', fields: ['User_2','User_1'], title: 'Rules Written', grid: true },{ type: 'Category', position: 'bottom', fields: ['sHourName'], title: 'Hour', grid: false, label: { rotate: { degrees: 315 } } }], series: [{ type: 'line', axis: 'left', xField: 'sHourName', yField: 'User_2', highlight: { size: 3, radius: 3 } },{ type: 'line', axis: 'left', xField: 'sHourName', yField: 'User_1', highlight: { size: 3, radius: 3 } }] }); });

    Read the article

  • axis-java2wsdl task classpath setting problem

    - by qkrsppopcmpt
    Hey Guys, here is my build.xml <?xml version="1.0" standalone="yes"?> <path id='axis2.classpath'> <fileset dir='D:\Tools\axis2-1.5.1-bin\axis2-1.5.1\lib'> <include name='**/*.jar' /> </fileset> </path> <path id='compiled.class.path'> <fileset dir='./bin/pkg'> <include name='*.class' /> </fileset> </path> <taskdef resource="axis-tasks.properties" classpathref="axis2.classpath" /> <target name="run" > <axis-java2wsdl output="out/TestService.wsdl" location="http://localhost:8080/axis2/service/TestService" namespace="service" classname="TestService"> <classpath refid="compiled.class.path"/> <mapping namespace="TestService" package="pkg"/> </axis-java2wsdl> </target> here is my file structure: prj-bin-pkg-TestService.class/////////// prj-src-pkg-TestService.java/////////// prj-build.xml I get java.lang.ClassNotFoundException: TestService. Can anybody tell me how to fix it? Thanks so much. !!!!!!!!!!!!!

    Read the article

  • Confusion about Rotation matrices from Euler Angles

    - by xEnOn
    I am trying to learn more about Euler Angles so as to help myself in understanding how I can control my camera better in the game. I came across the following formula that converts Euler Angles to rotation matrices: In the equation, I could see that the first matrix from the left is the rotation matrix about x-axis, the second is about y-axis and the third is about z-axis. From my understanding about ordinary matrix transformations, the later transformation is always applied to the right hand side. And if I'm right about this, then the above equation should have a rotation order starting from rotating about z-axis, y-axis, then finally x-axis. But, from the symbols it seems that the rotation order start rotating about x-axis, then y-axis, then finally z-axis. What should the actual order of the rotation be? Also, I am confuse about if the input vector, in this case, would be a row vector on the left, or a column vector on the right?

    Read the article

  • My Linux desktop sees my HDMI-connected monitor, but my monitor says "No signal"

    - by hrunting
    I have a Gigabyte H55M-UD2H motherboard and an Acer S271HL monitor. When I connect the monitor to the motherboard via VGA, signal works perfectly. When I connect the monitor via HDMI, the system "sees" the connection, but the monitor receives no signal (the monitor shows a blue box which reads "No Signal" and then the monitor goes into power-saving state). Some fun facts about this: if I hook a different monitor to this box via HDMI, the monitor receives the output without issue (same computer/motherboard, same cable, different monitor) if I connect a different computer to the monitor via HDMI, the monitor receives the output without issue (different computer, same cable, same monitor) no signal is received whether in the OS or in the BIOS there are no BIOS options for controlling video output other than for selection of onboard vs. PCI/PCI-E-based video card (the system has no dedicated video card installed) The box is running Linux, so I have the output of xrandr which shows the connection and the monitor modes detected via DDC: ~$ xrandr --prop Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) Broadcast RGB: Full supported: Full Limited 16:2 audio: auto supported: force-dvi off auto on DP1 disconnected (normal left inverted right x axis y axis) Broadcast RGB: Full supported: Full Limited 16:2 audio: auto supported: force-dvi off auto on HDMI2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm EDID: 00ffffffffffff000472ca028d128022 1c160103803c2278ca7b45a4554aa227 0b5054bfef80714f8140818081c08100 9500b300d1c0023a801871382d40582c 450056502100001e000000fd00384c1f 5311000a202020202020000000fc0053 323731484c0a202020202020000000ff 004c55573044303130383531300a01e5 020324f14f0102030405060790111213 1415161f230907078301000067030c00 1000382d023a801871382d40582c4500 56502100001f011d8018711c1620582c 250056502100009f011d007251d01e20 6e28550056502100001e8c0ad08a20e0 2d10103e960056502100001800000000 000000000000000000000000000000de Broadcast RGB: Full supported: Full Limited 16:2 audio: auto supported: force-dvi off auto on 1920x1080 60.0*+ 50.0 25.0 30.0 1680x1050 59.9 1680x945 60.0 1400x1050 74.9 59.9 1600x900 60.0 1280x1024 75.0 60.0 1440x900 75.0 59.9 1280x960 60.0 1366x768 60.0 1360x768 60.0 1280x800 74.9 59.9 1152x864 75.0 1280x768 74.9 60.0 1280x720 50.0 60.0 1440x576 25.0 1024x768 75.1 70.1 60.0 1440x480 30.0 1024x576 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 720x576 50.0 848x480 60.0 720x480 59.9 640x480 72.8 75.0 66.7 60.0 59.9 720x400 70.1 HDMI3 disconnected (normal left inverted right x axis y axis) Broadcast RGB: Full supported: Full Limited 16:2 audio: auto supported: force-dvi off auto on DP2 disconnected (normal left inverted right x axis y axis) Broadcast RGB: Full supported: Full Limited 16:2 audio: auto supported: force-dvi off auto on DP3 disconnected (normal left inverted right x axis y axis) Broadcast RGB: Full supported: Full Limited 16:2 audio: auto supported: force-dvi off auto on How do I get this monitor to recognize the output from this HDMI socket?

    Read the article

  • Annotating axis in ggplot2

    - by mpiktas
    I am looking for the way to annotate axis in ggplot2. The example of the problem can be found here: http://learnr.wordpress.com/2009/09/24/ggplot2-back-to-back-bar-charts. The y axis of the chart (example graph in the link) has an annotation: (million euro). Is there a way to create such types of annotations in ggplot2? Looking at the documentation there is no obvious way, since the ggplot does not explicitly let you put objects outside plotting area. But maybe there is some workaround? One of the possible workarounds I thought about is using scales: data=data.frame(x=1:10,y=1:10) qplot(x=x,y=y,data=data)+scale_y_continuous(breaks=10.1,label="Millions") But then how do I remove the tick? And it seems that since ggplot does not support multiple scales, I will need to grab the output of the scale_y_continuous, when it calculates the scales automaticaly and then add my custom break and label by hand. Maybe there is a better way?

    Read the article

  • Perspective Rotation about Y axis

    - by N.A.Reddy
    Hello Experts, I have a 2D image and I want to create a anaglyph image for this single 2D image. To do this I need to create Left and Right views. I will considar my 2D image as Left view and I want to create Right View now. I came to know that the perspective rotation (about Y axis) and perspective skews will give the right image. I know that the perspective projection is related to 3D. Basically I am new to 3D programming. Can you plz explain how to do perspective rotation abuout Y-axis. And how can I apply this to my 2D image.I am using C++. Thank you verymuch N.A.Reddy.

    Read the article

  • Determining what frequencies correspond to the x axis in aurioTouch sample application

    - by eagle
    I'm looking at the aurioTouch sample application for the iPhone SDK. It has a basic spectrum analyzer implemented when you choose the "FFT" option. One of the things the app is lacking is X axis labels (i.e. the frequency labels). In the aurioTouchAppDelegate.mm file, in the function - (void)drawOscilloscope at line 652, it has the following code: if (displayMode == aurioTouchDisplayModeOscilloscopeFFT) { if (fftBufferManager->HasNewAudioData()) { if (fftBufferManager->ComputeFFT(l_fftData)) [self setFFTData:l_fftData length:fftBufferManager->GetNumberFrames() / 2]; else hasNewFFTData = NO; } if (hasNewFFTData) { int y, maxY; maxY = drawBufferLen; for (y=0; y<maxY; y++) { CGFloat yFract = (CGFloat)y / (CGFloat)(maxY - 1); CGFloat fftIdx = yFract * ((CGFloat)fftLength); double fftIdx_i, fftIdx_f; fftIdx_f = modf(fftIdx, &fftIdx_i); SInt8 fft_l, fft_r; CGFloat fft_l_fl, fft_r_fl; CGFloat interpVal; fft_l = (fftData[(int)fftIdx_i] & 0xFF000000) >> 24; fft_r = (fftData[(int)fftIdx_i + 1] & 0xFF000000) >> 24; fft_l_fl = (CGFloat)(fft_l + 80) / 64.; fft_r_fl = (CGFloat)(fft_r + 80) / 64.; interpVal = fft_l_fl * (1. - fftIdx_f) + fft_r_fl * fftIdx_f; interpVal = CLAMP(0., interpVal, 1.); drawBuffers[0][y] = (interpVal * 120); } cycleOscilloscopeLines(); } } From my understanding, this part of the code is what is used to decide which magnitude to draw for each frequency in the UI. My question is how can I determine what frequency each iteration (or y value) represents inside the for loop. For example, if I want to know what the magnitude is for 6kHz, I'm thinking of adding a line similar to the following: if (yValueRepresentskHz(y, 6)) NSLog(@"The magnitude for 6kHz is %f", (interpVal * 120)); Please note that although they chose to use the variable name y, from what I understand, it actually represents the x-axis in the visual graph of the spectrum analyzer, and the value of the drawBuffers[0][y] represents the y-axis.

    Read the article

  • How to center an R plot after removing axis labels

    - by ConnorG
    I'm working on visualizing a matrix in R (almost exactly like http://reference.wolfram.com/mathematica/ref/MatrixPlot.html), and I've been using image(<matrix>,axes=FALSE) to draw the picture. However, I noticed that with the y-axis turned off, the plot isn't centered--the space is still there for the axis ticks + label. I can finagle some centering with par(oma=c(0,0,0,2.5)) but this seems inefficient and error-prone (if my matrix were to change dimensions/become non-square). Is there a better way to force the graphic to center? The right hand margin is significantly smaller than the left.

    Read the article

  • How do I refer to a client_deploy.wsdd file that's in WEB-INF?

    - by Paul
    A basic question, but I can't seem to find the answer. I have an Axis-generated web service that also calls another web service (for which the stubs are also generated with Axis). It's deployed in weblogic 9.2 That called web service requires authentication. I've googled for the code to set up authentication. It requires that I set up a client_deploy.wsdd file which I've done, and added it to WEB-INF. I need to specify this flle to Axis. There seem to be several ways of doing this, including System.setProperty("axis.ClientConfigFile", "client_deploy.wsdd") or EngineConfiguration config = new FileProvider("client_deploy.wsdd"); but these aren't working for me. Is the issue the path for the client_deploy.wsdd file? How do I refer to a file that's at the top level of the WEB-INF directory? Googling tells me how to access it as a stream, but I don't want that, I need to pass a file name to these functions... Please point out the obvious that I have missed

    Read the article

  • Using AChartEngine library for graphs, not able to get value for diffrent x-axis value

    - by kundan Chaudhary
    public static ArrayList<double[]> Value = new ArrayList<double[]>(); private double[] x = new double[10]; private double[] y = new double[10]; int counter = -1; add.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { counter++; x[counter] = Double.parseDouble(income_1.getText().toString()); y[counter] = Double.parseDouble(income_2.getText().toString()); income_1.setText(""); income_2.setText(""); } }); publish.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (Value != null) { Value.add(x); Value.add(y); Intent intent = salesStackedBarChart.execute(BarChart.this, Value, counter); startActivity(intent); } } }); //and in SalesStackedBarChart.java class public Intent execute(Context context, ArrayList<double[]> values ,int counter) { int count = counter + 1; double fcount = counter + 1.5; String[] titles = new String[] { "Android", "iPhone" }; int[] colors = new int[] { Color.GREEN, Color.CYAN }; XYMultipleSeriesRenderer renderer = buildBarRenderer(colors); setChartSettings(renderer, "Yearly revenue in the last "+count+" years", "Years", "revenue in $", 0.5, fcount, 0, 24000, Color.GRAY, Color.LTGRAY); renderer.setXLabels(count); renderer.setYLabels(10); renderer.setDisplayChartValues(true); renderer.setXLabelsAlign(Align.LEFT); renderer.setYLabelsAlign(Align.LEFT); renderer.setZoomRate(1.1f); renderer.setBarSpacing(0.5); return ChartFactory.getBarChartIntent(context, buildBarDataset(titles, values), renderer, Type.DEFAULT); } // in AbstractDemoChart.java class protected XYMultipleSeriesDataset buildBarDataset(String[] titles, List<double[]> values) { XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset(); int length = titles.length; for (int i = 0; i < length; i++) { CategorySeries series = new CategorySeries(titles[i]); double[] v = values.get(i); int seriesLength = v.length; for (int k = 0; k < seriesLength; k++) { series.add(v[k]); } dataset.addSeries(series.toXYSeries()); } return dataset; } Run this project i get graph with x- axis value: 1,2,3,4,5.... But I want to print value: 2005,2006,2007,2008..... I changed in some code like: setChartSettings(renderer, "Yearly revenue in the last "+count+" years", "Years", "revenue in $", 2005, 2010, 0, 24000, Color.GRAY, Color.LTGRAY); and run project i get value of x-axis like: 2005,2006,2007.... but not get graph bar value. Values of all x-axis are null. How can I make this work?

    Read the article

  • matlab: how to transform screen pixels into specific coordinates

    - by user3137385
    I have to draw a curve captured on a image using screen pixels (mouse clicks) into a coordinate system. E.g.: Pixels on the screen, from left to right (130 px to 970 px) correspond to the x-axis of my coordinate system (1000 to 6000). Pixels from bottom to top (670 to 99) correspond to the y-axis of coordinate system (0 to 1.2). How can this be done? Maybe there's a function in matlab doing something like that? Some more explanation: I have a jpg image of a curve on a coordinate system. I've got pixel positions (x,y) of several points on that curve. Now I want to plot same curve into a matlab figure with same x and y axis as on the jpg image.

    Read the article

  • Quaternions, Axis Angles and Rotation Matrices. Which of these should I use for FP Camera?

    - by Afonso Lage
    After 2 weeks of reading many math formulas and such I know what is a Quaternion, an Axis Angles and Matrices. I have made my own math libary (Java) to use on my game (LWJGL). But I'm really confused about all this. I want to have a 3D first person camera. The move (translation) is working fine but the rotation isnt working like I need. I need a camera to rotate arround world Axis and not about its own axis. But even using Quaternions, this doesnt work and no matter how much I read about Euler Angles, everybody says to me dont touch on it! This is a little piece of code that i'm using to make the rotation: Quaternion qPitch = Quaternion.createFromAxis(cameraRotate.x, 1.0f, 0.0f, 0.0f); Quaternion qYaw = Quaternion.createFromAxis(cameraRotate.y, 0.0f, 1.0f, 0.0f); this.multiplicate(qPitch.toMatrix4f().toArray()); this.multiplicate(qYaw.toMatrix4f().toArray()); Where this is a Matrix4f view matrix and cameraRotate is a Vector3f that just handle the angles to rotate obtained from mouse move. So I think I'm doing everything right: Translate the view Matrix Rotate the Move Matrix So, after reading all this, I just want to know: To obtain a correct first person camera rotate, I must need to use Quaternios to make the rotations, but how to rotate around world axis? Thanks for reading it. Best regards, Afonso Lage

    Read the article

  • Labeling Y axis with PChart

    - by Sortea2
    I am using PChart for PHP to draw graphs, it is working pretty well. I have drawn a graph with intensities (2 = strong, 1 = medium, 0 = low) and I would like to know if is possible to show on the Y axis the description of the data (strong,medium,low) instead of the inappropriate numbers (2,1,0). (I have search a lot without success, theoretically you can only set the X labels according to http://pchart.sourceforge.net/documentation.php?topic=faq.xlabels.) Thanks!

    Read the article

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