Generate Point Q in ECIES

Hi all
I have the next code:
ECPublicKeyParameters pubKey = new ECPublicKeyParameters(
curve.decodePoint(Hex.decode("0262b12d60690cdcf330babab6e69763b471f994dd702d16a5")), // Q
params);
My question is: Is there any way to generate the string *"0262b12d60690cdcf330babab6e69763b471f994dd702d16a52"* like random. Can I generate the point Q of an elliptic curve in bouncy Castle?
Thanks.

Are you asking how to generate a random point on a given elliptic curve? One way is to take a known base point of known order r and "multiply" (as in elliptic curve scalar point multiplication) by a random integer in [0, r-1]. The class org.bouncycastle.math.ec.ECPoint has a multiply() method you can use. Another method, which is a little trickier to get right, is to select a random x coordinate and attempt to solve for the y coordinate, using the Weirstrass form of the curve: see the Wikipedia article for more info: https://secure.wikimedia.org/wikipedia/en/wiki/Elliptic_curve. If a solution exists then both (x,y) and (x,-y) are points on the curve. If a solution does not exists then try another random x.
The Bouncycastle class org.bouncycastle.math.ec.ECFieldElement can be used to compute square roots. WARNING: It really helps to look at the source code for these Bouncycastle classes.

Similar Messages

  • I want to use the Function Generator VI to send command signals through the NI 7344 motion controller. This will be a closed loop servo valve system. I want to be able to change from say a square wave to a sine wave on the fly. Idea's?

    I am going to run tests that require an actuator to move using various types of arbitrary waveforms such as sine or square. The NI 7344 is hooked to the UMI that is going through a driver for a servo valve. The loop is analog and it is closed. I have played with some of the examples but can't get it to work. I have used the function generator VI to generate a signal but I think I am using the wrong input VI to the motion control board. When I use what I have it moves the servo and then stops. It doesn't continually generate the signal.
    I would love to use the controls on the function generator vi to control frequency and amplitude ect. Any help or pointer would be helpful. Thank you in advance.

    Hello,
    I'm not clear on exactly how you want to use the generated data but I'm assuming they will be used as your target points.
    There's a built-in example for motion called 'One-Axis Contour Move.vi'. This example demonstrates how to provide your target points as 1-D array. All you need to do is to replace the input array with the output of the function generator. In order to have it run continuously, use a while loop. You can further program your application so that it'll change the waveform on the fly by monitoring the user interface but this might be little little tricky as you will need to reset the move and load the new generated points while keeping track of your current position.
    I hope this helps. Let me know if you have further questions regarding this
    application.
    Best regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • Create point geometry off Line string

    Hi,
    I am new in using the oracle spatial functions. I need some help in trying to generate point geomteries off a line string.
    E.g. I have a line string say is a mile long; I need to dynseg this line string at regular intervals say 1/100th of a mile (52 feet accuracy) and extract the point geometries.
    Basically for a mile long line string, I need 10 point geomteries at equal distances (.01 mile apart). How can I achieve this? Do we have any geomtery functions that does this dyn seg?
    Any help is appreciated.
    This is an e.g of a line string in my table.
    Route: SFRAIR00270**C
    Begin_log:     15.21
    End-log:     15.42
    SD_GEOM: 2002, 41104, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(NUMBER(1, 2, 1)), MDSYS.SDO_ORDINATE_ARRAY(NUMBER(545906.05083, 229998.885452, 545888.2, 230082.23, 545838.54, 230335.43))
    Thanks,
    LS.
    Edited by: user12035460 on Nov 9, 2012 12:35 PM

    If you are licensed for Spatial then look at the SDO_LRS package. It has all the functionality you need.
    If you are not so licensed, have a look at the LINEAR package on my website.
    http://www.spatialdbadvisor.com/source_code/214/linear-package-sdo_lrs-replacement
    regards
    Simon

  • No points for WIKI posted so far?

    I had created couple of WIKI pages for Adobe Scenarios long time back and have not received any points for it so far.
    Does that mean the [WIKI content|http://wiki.sdn.sap.com/wiki/display/EmTech/Adobe+Scenarios] I created is not worth it?

    Hi Chintan,
    Is this content you submitted in February 2010? I just checked your pages. FYI, content in the Wiki needs to be reviewed by SAP and cannot generate points automatically. We want to avoid point allocation for minor edits, that's why there is a manual process involved. And as with all manual processes, this means a delay in reviewing content. I don't know when the next update is in the Wiki point system, but will ask my colleagues in Israel and get back to you in this forum. Please give us a couple of days since it's currently a Holiday in Israel.
    Thanks,
    Laure

  • Moving the log file of a publisher database SQL Server 2008

    There are many threads on this here. Most of them not at all helpful and some of them wrong. Thus a fresh post.
    This post regards SQL Server 2008 (10.0.5841)
    The PUBLISHER database primary log file which is currently of 3 blocks and not extendable,
    must be moved as the LUN is going away.
    The database has several TB of data and a large number of push transactional replications as well as a couple of bi-directional replications.
    While the primary log file is active, it is almost never (if ever) used due to its small fixed size.
    We are in the 20,000 TPS range at peak (according to perfmon). This is a non-trivial installation.
    This means that
    backup/restore is not even a remotely viable option (it never is in the real world)
    downtime minimization is critical - measured in minutes or less.
    dismantling and recreating the replications is doable, but I have to say, I have zero trust in the script writer to generate accurate scripts. Many of these replications were originally set up in older versions of SQL Server and have come along for the
    ride as upgrades have occurred. I consider scripting everything and dismantling the whole lot pretty high risk. In any case, I do not want to have to reinitialize any replications as this takes, effectively, an eternity.
    Possible solution:
    The only option I can think of is to wind down everything, such that there are zero outstanding uncommitted transactions and detach the database, delete the offending log file and reattach using the CREATE DATABASE xyz ATTACH_REBUILD_LOG option.
    This should, if I have understood things correctly, cause SQL Server to recreate the default log file in the same directory as the .mdf file. I am not sure what will happen to the secondary log file which is not moving anywhere at this point.
    The hard bit is insuring that every transaction in the active log files have been replicated before shutdown. This is probably doable. I do not know how to manually flush any left over transactions to replication. I expect if I shut down all "real"
    activity and wait for a certain amount of time, eventually all the replications will show "No replicated transactions are available" and then I would be good to go.
    Hillary, if you happen to be there, comments appreciated.

    Hi Philip
    you should try this long back suggested way of stopping replication and restore db and rename or detach attach
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6731803b-3efa-4820-a303-4ffb7edf154a/detaching-a-replicated-database?forum=sqlreplication
    Thanks
    Saurabh Sinha
    http://saurabhsinhainblogs.blogspot.in/
    Please click the Mark as answer button and vote as helpful
    if this reply solves your problem
    I do not wish to be rude, but which part of the OP didn't you understand?
    Specifically the bit about 20,000 transactions a second and database size of several TB. Do you have any concept whatsoever of what this means? I will answer for you, "no, you are clueless" as your answer clearly shows.
    Stop wasting bandwidth by proposing pointless and wrong solutions which indicate that you did not read the OP, or do you just do this to generate points?
    Also, you clearly failed to notice that I was on the thread to which you referred, and I had some pointed comments to make. This thread was an attempt to garner some input for an alternative proposal.

  • Base64Binary to byte[] problem in Wireless Toolkit and NetBeans

    Hi,
    I am generating stub with J2me Wireless toolkit. But the problem is that the toolkit can't successfully convert base64Binary to byte[] and gives error "Unknown simple type byte[]". Netbeans also gives some error while compiling it. Please anybody tell me how can i resolve this problem. Using base64Binary type is must.
    Kindly reply if you know. My email address is [email protected]
    Wasif Ehsan
    [email protected]

    public interface JobUpdate {
         @SuppressWarnings("unchecked")
         public String[] getUpdatedJobList(@WebParam(name="phoneJobs")String[] phoneJobs);
         @SuppressWarnings("unchecked")
         public void retrieveJobsWorked(@WebParam(name="data")byte [] data);
    I then use this to start the service
    JobUpdateImpl implementor = new JobUpdateImpl();
              JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
              svrFactory.setServiceClass(JobUpdate.class);
              svrFactory.setAddress("http://localhost:9000/JobUpdate");
              svrFactory.setServiceBean(implementor);
              svrFactory.getInInterceptors().add(new LoggingInInterceptor());
              svrFactory.getOutInterceptors().add(new LoggingOutInterceptor());
              svrFactory.create();
    Then use the wtk stub generator pointing at the service.
    http://localhost:9000/JobUpdate?wsdl
    The error returned by the tool is error: Found unknown simple type: byte[]
    Any ideas?

  • Want to use the function shuffle to all albums (Music)

    Dear friends, since yesterday I'm unhappy user of the new IOS7. At the old IOS 6 I was able to push the shuffle button in the folder album or artist at the top of the list. Now this button is missing!! (Which crazy developer delete this !!!!)
    Does somebody know a solution to shuffle over all artists or albums list without creating a list of all?
    BR comueller

    Hello,
    I'm not clear on exactly how you want to use the generated data but I'm assuming they will be used as your target points.
    There's a built-in example for motion called 'One-Axis Contour Move.vi'. This example demonstrates how to provide your target points as 1-D array. All you need to do is to replace the input array with the output of the function generator. In order to have it run continuously, use a while loop. You can further program your application so that it'll change the waveform on the fly by monitoring the user interface but this might be little little tricky as you will need to reset the move and load the new generated points while keeping track of your current position.
    I hope this helps. Let me know if you have further questions regarding this
    application.
    Best regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • Distance Algorithm. Please help!

    I need to find an algorithm for calculating the closest point to each point contained in a given array. That is, for each point in an array of randomly generated points, I need to find the point closest to it other than itself. I already have a basic algorithm to solve this, but it compares the distances between the current point and every other point in the array, making it very inefficient (O(n^2)). I am looking for a more efficient algorithm. Can anyone point me in the right direction? No code needed, I can handle that myself. Thanks.
    Edited by: 799505 on Mar 3, 2011 4:02 PM

    837443 wrote:
    What about sorting the array. I think the method is Arrays.sort() in the java util. Then with a sorted array you only have to check the point before and the point after. That way you only have to check 2 points instead of the whole array.
    Or, what about using a tree instead of an array. Trees will sort themselves automatically with each addition. Then you only have to check 2 points (the one before and after).
    Or, another option, you could convert the array to a tree.
    I think that if the array is NOT sorted then you will have to check every single element of the array.
    I hope that helps with your efficiency problem. Take care.That works if they're points on a line, but not if they're points in a plane or other higher-than-one dimensional space. Unless there are rules that say that, for instance (1, 2) is "closer to" the origin than (2, 1), and those rules can impose a total ordering on the points.

  • BSP Graphics Extension (MTA)

    Dear All,
    I am trying to generate an MTA using BSP graphics extension. I have managed to get the structure of the graphic:
    <Defaults>
    <ChartType>MTA</ChartType>
    <FontFamily>Arial</FontFamily>
    </Defaults>
    However, I am having trouble placing the values or points on the chart.
    As far as I understand, I can use "Series" to generate points on bar charts or line charts,
       <SimpleChartData>
            <Categories>
              <C>Category 1</C>
              <C>Category 2</C>
              <C>Category 3</C>
              <C>Category 4</C>
              <C>Category 5</C>
            </Categories>
            <Series>
              <S label="17.55%">17.55</S>
              <S label="17.10%">17.10</S>
              <S label="8.70%">8.7</S>
              <S label="8.25%">8.25</S>
              <S label="6.87%">6.87</S>
            </Series>
          </SimpleChartData>
    but this won't work for the MTA.
    I have defined the timeaxis
    <TimeAxis id="TimeAxis1">
       <Visibility>true</Visibility>
       <Extension></Extension>
       <Minimum>20060101</Minimum>
       <MinimumAutomatic>true</MinimumAutomatic>
       <Maximum>20080101</Maximum>
       <MaximumAutomatic>true</MaximumAutomatic>
       <Position>Secondary</Position>
    </TimeAxis>
    <TimeAxis id="TimeAxis2">
       <Visibility>true</Visibility>
       <Extension></Extension>
       <Minimum>20000101</Minimum>
       <MinimumAutomatic>true</MinimumAutomatic>
       <Maximum>20080101</Maximum>
       <MaximumAutomatic>true</MaximumAutomatic>
       <Position>Primary</Position>
    </TimeAxis>
    so my guess is it should go something like
       <SimpleChartData>
            <Categories>
              <C>Category 1</C>
              <C>Category 2</C>
              <C>Category 3</C>
              <C>Category 4</C>
              <C>Category 5</C>
            </Categories>
            <Series>
              <S label="20050101">20050101</S>
              <S label="20050601">20050601</S>
              <S label="20050601">20050601</S>
              <S label="20050701">20050701</S>
              <S label="20050701">20050701</S>
            </Series>
          </SimpleChartData>
    This won't work.
    I have looked all over the web, but there seems to be little to no documentation to the BSP graphics extension, and especially to time axis. I have also found a lot of examples of normal charts with time axis, but none which show a simple defition of fixed values.
    The chart is merely for show-case use, therefore using fixed values is no problem.
    If anyone has an idea as to what might work, please help
    Thanks
    Svenja

    i have used a model class.
    data: model type ref to ZCL_GRAPH_CPH_MODEL . " this class implements IF_GRAPH_DATA_MODEL interface
      create object model.
    <graphics:chart width               = "400"
                              height              = "300"
                              igs_rfc_destination = "IGS_RFC_DEST" >
                <graphics:data model="<%= model %>" />
                <graphics:custom>
                  <graphics:nativexml>
                    <?xml version="1.0" encoding="utf-8"?>
                    <SAPChartCustomizing version="1.1">
                     <GlobalSettings>
    in the method (IF_GRAPH_DATA_MODEL~GET_DATA_XML) i populate the values like this.
      TYPES: BEGIN OF t_point_data,
                 tooltip TYPE string,
                 value TYPE string,
               END OF t_point_data.
      TYPES: t_point_data_tab TYPE STANDARD TABLE OF t_point_data.
      DATA: BEGIN OF t_series_data,
              tooltip TYPE string,
              label TYPE string,
              point_data TYPE t_point_data_tab,
            END OF t_series_data.
      DATA: l_ixml                                 TYPE REF TO if_ixml,
            l_ixml_sf                              TYPE REF TO if_ixml_stream_factory,
            l_istream                              TYPE REF TO if_ixml_istream,
            l_ostream                              TYPE REF TO if_ixml_ostream,
            l_document                             TYPE REF TO if_ixml_document,
            l_parser                               TYPE REF TO if_ixml_parser,
            l_root_element                         TYPE REF TO if_ixml_element,
            l_categories_element                   TYPE REF TO if_ixml_element,
            l_series_1_element                     TYPE REF TO if_ixml_element,
            l_series_2_element                     TYPE REF TO if_ixml_element,
            l_c_element                            TYPE REF TO if_ixml_element,
            l_s_element                            TYPE REF TO if_ixml_element,
            l_series_1_data                        LIKE t_series_data,
            l_series_2_data                        LIKE t_series_data,
            l_point_data                           TYPE t_point_data,
            l_category_name                        TYPE string,
            l_category_data_tab                    TYPE STANDARD TABLE OF string,
            l_tooltip                              TYPE string,
            l_apostrophe                           TYPE string VALUE  ''''.
    * fill category data <outtab> is an itab holding the values to be passed to graph
      LOOP AT <outtab> ASSIGNING <l_line> .
        ASSIGN COMPONENT 1 OF STRUCTURE <l_line> TO <l_field> .
        APPEND <l_field> TO l_category_data_tab.
      ENDLOOP .
    * fill data for series 1
      LOOP AT <outtab> ASSIGNING <l_line> .
        ASSIGN COMPONENT 2 OF STRUCTURE <l_line> TO <l_field> .
        l_series_1_data-tooltip = 'Actual'.
        l_series_1_data-label = 'Actual'.
        l_point_data-tooltip = <l_field> .
        l_point_data-value = <l_field> .
        APPEND l_point_data TO l_series_1_data-point_data.
      ENDLOOP .
    * fill data for series 2
      LOOP AT <outtab> ASSIGNING <l_line> .
        ASSIGN COMPONENT 3 OF STRUCTURE <l_line> TO <l_field> .
        l_series_2_data-tooltip = 'Plan'.
        l_series_2_data-label = 'Plan'.
        l_point_data-tooltip = <l_field> .
        l_point_data-value = <l_field>.
        APPEND l_point_data TO l_series_2_data-point_data.
      ENDLOOP .
      l_ixml = cl_ixml=>create( ).
      l_ixml_sf = l_ixml->create_stream_factory( ).
      l_document = l_ixml->create_document( ).
      l_root_element = l_document->create_element( name = 'SimpleChartData' ).
      l_root_element->set_attribute( name = 'version' value = '1.0' ).
      l_document->append_child( new_child = l_root_element ).
    * create category xml
      l_categories_element = l_document->create_simple_element( parent = l_root_element  name = 'Categories' ).
      LOOP AT l_category_data_tab INTO l_category_name.
        l_c_element = l_document->create_simple_element( parent = l_categories_element  name = 'C' value = l_category_name ).
      ENDLOOP.
    * create series 1 xml
      l_series_1_element = l_document->create_simple_element( parent = l_root_element  name = 'Series' ).
      l_tooltip = 'title='.
      CONCATENATE l_tooltip l_apostrophe l_series_1_data-tooltip l_apostrophe INTO l_tooltip.
      l_series_1_element->set_attribute( name = 'extension' value = l_tooltip ).
      l_series_1_element->set_attribute( name = 'label' value = l_series_1_data-label ).
      LOOP AT l_series_1_data-point_data INTO l_point_data.
        l_s_element = l_document->create_simple_element( parent = l_series_1_element  name = 'S' value = l_point_data-value ).
        l_tooltip = 'title='.
        CONCATENATE l_tooltip l_apostrophe l_point_data-tooltip l_apostrophe INTO l_tooltip.
        l_s_element->set_attribute( name = 'extension' value = l_tooltip ).
      ENDLOOP.
    * create series 2 xml
      l_series_2_element = l_document->create_simple_element( parent = l_root_element  name = 'Series' ).
      l_tooltip = 'title='.
      CONCATENATE l_tooltip l_apostrophe l_series_2_data-tooltip l_apostrophe INTO l_tooltip.
      l_series_2_element->set_attribute( name = 'extension' value = l_tooltip ).
      l_series_2_element->set_attribute( name = 'label' value = l_series_2_data-label ).
      LOOP AT l_series_2_data-point_data INTO l_point_data.
        l_s_element = l_document->create_simple_element( parent = l_series_2_element  name = 'S' value = l_point_data-value ).
        l_tooltip = 'title='.
        CONCATENATE l_tooltip l_apostrophe l_point_data-tooltip l_apostrophe INTO l_tooltip.
        l_s_element->set_attribute( name = 'extension' value = l_tooltip ).
      ENDLOOP.
      l_ostream = l_ixml_sf->create_ostream_xstring( xml ).
      l_document->render( ostream = l_ostream ).
    Regards
    Raja

  • Drawing a sine curve in 3D

    I would like to draw a sine curve in Java 3D. Is there a way to do that? I am generating points on the fly and putting them in Point3D array. Then I generated the indices and used IndexedLineArray to draw lines on the fly. But they don't show up properly and there is no consistency. Is it because Java 3D is multi-threaded?
    Is there a better way to do it? I need some advice. If necessary, I will post some code also.
    Thank you,
    -Sri :)

    Yes, I have set the appearance, but I am not using any color values.
    Here's some sample code:
    ==========================
    private IndexedLineArray la;
    private Shape3D shape;
    Appearance a = new Appearance();
    PolygonAttributes attr = new PolygonAttributes();
    attr.setCullFace(PolygonAttributes.CULL_NONE);
    a.setPolygonAttributes(attr);
    shape = new Shape3D(la,a);
    shape.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    ===========================
    I think the points are being drawn too fast. Maybe I should reduce the number of frames?
    -Sri :)

  • Pre Built Portlets

    In the document "Oracle® Application Server Portal Developer's Guide, 10g,
    Release 2 (10.1.4), B14135-03" section 1.4.2 Other Sources of Pre Built Portlets refers to a Portal Catalog on the Portal Center that contains portlets such as Generating point-to-point driving directions, Accessing IT information from a wide variety of sources and Viewing summary information on news, stocks, and weather. I cannot locate the Portal Catalog. Can someone please direct me to this as we are looking for a news portlet.

    Hi
    The portlet catalogue was merged into the Partner Solutions catalogue that is available on the top right hand corner of
    http://oraclepartnernetwork.oracle.com/
    Regards

  • How to Calculate the Space between two Characters in GDI + ?

    I am Drawing the set of characters in Graphics, by Calculating the points using GraphicsPath for each Character. I Need to know how to calculate the distance should be given between the two characters?
    I am using this code to generate points
    PointF [] pnts;
    var p=new GraphicsPath();
    path.AddString("A","Arial",(int)FontStyle.Regular,50,new pointF(0f,0f),StringFormat.GenericDefault);
    Matrix m=new Matric(1,0,0,1,0,0);
    path.Flatten(m,1,0f);
    pnts=path.pathpoints;
    i am getting the points for all characters using the above code.
    Now i am combining the two character Using the points generated by the above code.  Eg "AB"
    Help me to calculate the the character space should be given between two characters?
    Thanks in Advance...

    Hi,
    this link can assist you:>
    Professional C# - Graphics with GDI+ 
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Map generation (polygon smoothing...)

    Hi guys,
    Im doing a final year project at uni and was wondering if anyone could help.
    Basicaly im doing a clone of Scorched Earth (tank game) and at the moment am trying to generate a random 2D map (the polygon). At given x co-ords (0,4,8...1024) im generating random y co-ords within a given limit. The polygon for this is being generated fine, but its a bit peaky/spiky...(!?!).
    Anyone know how i could possibly smooth it out?
    Or if anyone knows any better ways of generating these 2D kinda maps, that'd be great.
    thanks,
    d

    Hi!
    I just implemented what I think you want...
    Try this and play a bit with the paramters of painting method
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.util.Random;
    import javax.swing.JFrame;
    * @author Dipl.Inf.(FH) Thorsten Hoffmann
    * Created on 16.12.2003
    public class Random2DLandscape extends JFrame {
         private int WIDTH = 800;
         private int HEIGHT = 600;
         public Random2DLandscape() {
              addWindowListener( new WindowAdapter() {
                   public void windowClosing( WindowEvent e ) {
                        System.exit(0);
              addMouseListener( new MouseAdapter() {
                   public void mouseClicked( MouseEvent e ) {
                        repaint();
              initGUI();
         private void initGUI() {
              setTitle( "Random2DLandscape" );
              setBounds( 0,0, WIDTH, HEIGHT );
              setVisible( true );
         public void paint( Graphics g ) {
              super.paint( g );
              paintRandom2DLandscape( 0, HEIGHT/2, WIDTH, 5, g );
          * Paints a smooth random landscape
          * @param beginPosX The x-coord where to begin
          * @param beginPosY The y-coord where to begin
          * @param width the width of the landscape
          * @param step The steps of randomly generated points
          * @param g The current Graphics object
         private void paintRandom2DLandscape( int beginPosX, int beginPosY, int width, int step, Graphics g ) {
              if( g != null ) {
                   Random rnd = new Random();
                   int rndDelta = 60;
                   int y = beginPosY;
                   int oldX = beginPosX;
                   int oldY = y;
                   g.setColor( Color.BLACK );
                   for( int a=0; a < width; a+=step ) {
                        int rndVal = rnd.nextInt( rndDelta );
                        y += (rndVal-(rndDelta >> 1));
                        g.drawLine( oldX, oldY, oldX+a, y );
                        oldY = y;
                        oldX = oldX+a;
         public static void main(String[] args) {
              new Random2DLandscape();
    }

  • Sensor Programming

    I am doing kinect sensor project to generate point cloud And
    I have to get the shortest distance (value of z in point cloud) between object and Sensor.
    I am having problem in getting the right values of z means ditance of object from the camera.
    I got some values in milimeter but those are coming .09 like that .That is wrong.
    I have used the function NuiTransformDepthImageToSkeleton() for getting the image depth in front of the camera.
    This is the method I am getting the data
    long* depth2rgb = (long*) depthToRgbMap;
    NUI_IMAGE_FRAME imageFrame;
    NUI_LOCKED_RECT LockedRect;
    if (sensor->NuiImageStreamGetNextFrame(depthStream, 0, &imageFrame) < 0) return;
    INuiFrameTexture* texture = imageFrame.pFrameTexture;
    texture->LockRect(0, &LockedRect, NULL, 0);
    if (LockedRect.Pitch != 0) {
    const USHORT* curr = (const USHORT*) LockedRect.pBits;
    for (int j = 0; j < height; ++j)
    std::ofstream fout3("XYZW_Value_MM.txt");
    if (fout3.is_open())
    fout3 << "X" << "\t\t" << "Y"<<"\t\t"<< "Z" << "\t\t" << "W" <<
    std::endl;
    for (int i = 0; i < width; ++i)
    // Get depth of pixel in millimeters
    USHORT depth = NuiDepthPixelToDepth(*curr++);
    // Store coordinates of the point corresponding to this pixel
    Vector4 pos1;
    Vector4 pos = NuiTransformDepthImageToSkeleton(i, j, depth << 3, NUI_IMAGE_RESOLUTION_640x480);
    long double x, y, z, w;
    x = pos.x ;
    y = pos.y ;
    z = pos.z ;
    w = pos.w ;
    fout3 << x << "\t";
    fout3 << y << "\t";
    fout3 << z << "\t";
    fout3 << w << std::endl;
    // Store the index into the color array corresponding to this pixel
    NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(
    NUI_IMAGE_RESOLUTION_640x480, NUI_IMAGE_RESOLUTION_640x480, NULL,
    i, j, depth << 3, depth2rgb, depth2rgb + 1);
    depth2rgb += 2;
    texture->UnlockRect(0);
    sensor->NuiImageStreamReleaseFrame(depthStream, &imageFrame);
    It is not giving right value .Please suggst.

    All Kinect distances are in millimeters. You will need to convert the depth values to inches yourself. Review the depth basics samples for the code needed to pull the depth value point from the depthframe. If you are using the packed version of the depth
    frame, you need to ensure you right shift by 3 to remove the lower 3 bits for the player mask.
    To get real world coordinates, you need to use the coordinate mapper and map the depth frame to SkeletonSpace. The Depth3D samples demonstrates this.
    Carmine Sirignano - MSFT

  • Can I use SoftMotion to simulate a PID motor control loop using a Solidworks model?

    Hi
    I'm not a labVIEW user yet. But I probably will become one when I can do the following:
    I have a Solidworks model of a complex machine with multiple servo motors. Can I use labVIEW plus SoftMotion to calculate the needed motor forces and aply these forces on the Solidworks model making some parts in the model move and can I get positional feedback from the Solidworks model which I can use in labVIEW to calculate the motor forces again. This way I could use labVIEW to simulate the complete motor control loop including some PID filtering.
    I could find some posts about SoftMotion, but they all seem to handle about SoftMotion in combination with external hardware. But I would like to do a complete software simulation.
    I hope this is possible.

    Hi Melomania
    Solidworks for SoftMotion works in an interesting manner. First SoftMotion runs in labview and plots a trajectory path based off the input from the user. The generated points are controlled by speed, velocity and acceleration. These generated points are sent to SolidWorks where the physics engine takes over. SolidWorks calculates the ammount of force required to move the component the given distance and also if there are any collisions that take place. Basically the whole process is open loop with no PID being implemented. The purpose for the software is to test your motion system for collisions and calculate the required torque for your motors to move and the velocities and accelerations provided. A system prototyped with SoftMotion Solidworks will still need to be tuned when constructed in the real world.
    For your application I would look into Control Design and Simulation Toolkit.
    Thank You
    Eric Reid
    National Instruments
    Motion R&D

Maybe you are looking for

  • How to create a custom kernel with initrd and ARCH patches

    Hi, I like the default kernel because everything seems to work well and I think the Arch kernel includes patches I need (such as the mactel patch). But some options that i would like to be enabled are not. in fact i would like to use powertop but i c

  • Want to output only the directory path in the jTextField

    Currently, I am getting the directory path, but need to select a file inside it, then only the directory path gets selected in the jTextField1. Please tell me how do I get the directory path in jTextField1 by selecting only the directories in jButton

  • Error when opening query.

    Hello All, In Bex Analyzer 7.10 when i open any query i get  pop-ups declaring that few Text-Elements are missing. This is the issue i'm facing. After clicking OK for each popup the report opens up. What could be the reason for these popups ? I'm on

  • Acrobat could not submit your data - trying to collect form data?

    Hi, I created a form in acrobat, i go through the process of distributing it, that is all successful but then i get this error: "Acrobat coudl not submit your data.  Please see Tracker for more information". But there is no information in the tracker

  • Cairngorm3 - Insync module exmaple does not work ?

    Hi, I've DL the module exampe; from the repository (eg. http://opensource.adobe.com/svn/opensource/cairngorm3/trunk/samples/insync/) and add the "missing libraries in order to make them compiling. These are compiling, but when I launch them (the shel