Is there any way to draw a line diagram using array of x, y co-ordinates in appcelerator? - line

If I select one of these co-ordinates, I want to highlight that point on the diagram (by a circle or whatever shape possible). Also I would like to save it later on.
I'm not sure if Appcelerator is flexible enough to do all these things (My search didn't yield much apart from here, this only supports Android), If not I'll have to generate this diagram in my webservice and pull it back on UI once there is an update in the co-ordinate array.

I've used Chartist inside a webview and it worked great. It produces a SVG graph instead of a canvas object which performs better.
If you want to use hyperloop you can use Ti.AndroidCharts

Related

Imagemap usage in qml

Is there any way to build an image map with qml (qt quick) components directly without importing html code?And I want to it's coordinates be same as html imagemap's coordinates(I dont want to recalculate my image map coords).
and
my shape is rectangular.tnx
No, there is no way. MouseAreas are always rectangular.
You would need to provide a some kind of collision detection function, to check whether your click happened inside of your object, described by the coordinates.
For this you can implement any of the algorithmns out there, in a way, that it supports your coordinate format. The right choice depends on the characteristics of your objects, like:
Is it a circle?
Is it a regular shape?
Is it convex?
Is it concave?
There are many good pages on collision detection, though a performant implementation might be tricky - especially in QtQuicks JS, so you probably want to do it in C++.
Another shot you might take, is dropping your coordinates, and produce masks that can be used with the solution provided here: https://stackoverflow.com/a/38177820/2056452 (coming from an official example)

java3d simple way to translate object

I am making my first program using Java3D. I have setup some transformGroups that I now need to move in calculated directions. When I looked this up, I found interpolators and alpha objects and waveforms and couldn't understand a word of it. I have done this in the past in OpenGL using simple vectors and frame refreshment. Is there a similar simple way in Java3d? Thanks.
There's no reason you couldn't do it with vectors and frame refresh in Java3D as well.
A simple way would be to attach a behavior to the scenegraph with a WakeupOnElapsedFrames(0) condition, and then have it update the needed transform every frame.
As its simplest, that is was the interpolators are doing for you. Once you get that working, it will probably make more sense as to how you could do it with interpolators.

How to put y axis number in Core Plot?

I would like my Scatter graph I am making with Core Plot library to show Y value near every point relative to X data.
I looked at CPTTestApp project from Core Plot examples, but I simply don't get it. First I thought the secret lies in
-(CPTPlotSymbol *)symbolForScatterPlot:(CPTScatterPlot *)plot recordIndex:(NSUInteger)index
method and I have implemented it in my project. Yes, I got points drawn, which is nice, but I found out this probably has nothing to do with values being shown near points....
This suspicion was confirmed when I opened Candlestick demo from Plot_Galley_Mac demo. There is no method from above and it shows numbers nicely!
If anyone can, please, help me. Otherwise, I would like to thank developers for sharing this library with us. Beside over usage of NSDecimal structure and a bit thin manual and reference data, this is fabulous project.
You're looking for "data labels". CPTPlot has a number of properties that control the built-in labeling functions:
labelOffset: distance between the point and the label
labelRotation: rotation angle
labelTextStyle: text style used to draw the labels
labelFormatter: number (or date) formatter used to format the labels
labelShadow: shadow properties applied to the labels
If the built-in labels don't meet your needs, you can create your own. Implement the -dataLabelForPlot:recordIndex: datasource method and return the desired label for each point. Custom labels can be any CPTLayer so you can make anything you want—text, images, or any custom layer that you create.

Manipulating / Resizing / Scaling an image in vb.net

Imagine I have a rectangle say 400px x 300px. Then let’s say I want to load an image in that. All of this is very easy using Sytem.Drawing.DrawImage.
Rectangle http://img576.imageshack.us/img576/2363/rectangle.gif
But then I want to leave the left hand side as 300px but change the right hand side to 250 px. I can draw the box using 4 DrawLines but I don’t know how to squash the image into the new shape. I want the right hand side of the shape to be 250, the left size 300 and the top and bottom 400px.
Resized http://img85.imageshack.us/img85/3479/rectangle2.gif
I can’t use DrawImage as it expects the left and right sizes to be the same. Is there a way to manipulate the image into the new shape?
I've looked at other questions, but they only apply where the left and right hand side is equal.
Any thoughts on how to squash an image into a shape which did not have parallel sides?
(If it helps, I'm happy to sacrifice image quality to fit the right shape.)
Disclaimer: I work for Atalasoft.
Our DotImage product has a command called QuadrilateralWarpCommand that can do this. It's in DotImage Photo.
What you want to do is non-trivial (but also very powerful).
#Heinzi is correct, the general class is called warp transformations. What you're trying to do is specifically a perspective transformation. At a high level, it involves running the individual coordinates through a transformation matrix to get their new positions, and then doing interpolation between pixel values based on the old and new locations.
This article talks about some transformations, one of them being a sheer, so it might be helpful overall. I'm not sure, I haven't read it closely. In general, you want to google for something approximately like "c# image transformation" or "c# image perspective transform".
Depending on what you're planning on using it for, buying a library might be the best way to go about it, although there is a lot to learn about image manipulation by doing it yourself.
I did not find a solution to your problem, but I have some information which might help you along:
What you want is called a warp transformation.
As far as I know, the .net framework natively supports this kind of transformation only for a GraphicsPath, namely, the GraphicsPath.Warp method. Unfortunately, I don't think that this will help you, unless you are willing to redraw your image using a .net GraphicsPath object.
If you need the transformation directly in the UI layer, your UI library might help: Silverlight, for example, includes the PlaneProjection class, which can be used for such effects; in WPF, the 3D engine might be useful for this (requiring more programming effort, through).

Is it possible to animate markers in ArcMap?

I'm completely new to ArcGIS and ArcMap, but someone suggested this program to me for a project I'm working on.
I would like to animate individual entities on a map, and was wondering if it is possible to do so in ArcMap. I asked this earlier here and a member directed me to a tutorial on animating in ArcGIS. The animation in the guide was over a map spread (ie. each pixel on the map displays, say, a different color to indicate population data in the area). However I realized that if I zoom in a lot, eventually the image will degenerate into pixels, which is why I need an actual object to mark a certain point. I checked some online tutorials and it seems like we can place markers on the map. Can someone tell me if it is possible to animate these markers (for example via a for-loop)? And if so, could you point me in a direction where to start?
Thanks in advance!
You can animate layers in ArcMap is the short answer. Its not as simple as using the timeline feature in Google Earth for example though. But then ArcMap is much more than just a visualization tool.
This help page on the ESRI web help looks like a good place to start.
I'm not 100% sure what you mean by the image degenerates into pixels. Are you saying that the markers were single points in the layer. Unlike Google Earth you are not confined to simply plotting points on the map. You can draw completely arbitrary shapes in ArcMap, which can be defined to cover actual areas of the map, so when you zoom-in the shape gets larger.
The way you need to load data into ArcMap to produce an animation isn't too simple. There might be other ways to do this, but the way I know of is to generate a NetCDF file. This file contains a 3D matrix of layer data, where each layer is separated through time. Because you generate a matrix, you are effectively placing a raster image over the map. Thus if you want to cover a large area, each matrix becomes large, and you multiply that by the number of time slices you wish to animate over.
Once you have a NetCDF file with your data in however, getting ArcMap to animate it and produce say a .avi file is pretty simple.
You could try just loading some of the example NetCDF datasets into ArcMap to see how/if they will work to get you started.
Hope that helps.
The upcoming v10 will have better time-aware capabilities, which will allow for animation.