Vector gradient calculation

I have a matrix (30X30) of electric potentials that I want to be able to convert to electric field components (x and y) at each point in the matrix. I have tried using a matlab script (with gradient command), but there seems to be something strange going on. Is there a way to do this easily in labview, or another way to do this in matlab? Has anyone else run into simlar problems? Thanks,
Joel

Hi,
you know that gradient is just the spatial differentiation of your 2D function.
grad U(x,y) = vector(dU/dx; dU/dy)
So all you need is to calculate derivatives of different rows and columns and to organize thm into 2D array of vectors.
You have to extract each row and calculate its derivative. This will be the array of dU/dx.
The same thing with columns to calculate dU/dy.
I've attached the example of how to do it. There you must specify 2D array and values for dx and dy between points. And this will return the gradient of your function.
Good luck.
Oleg Chutko.
Attachments:
Grad.vi ‏48 KB

Similar Messages

  • No Option for Printing Separations in Acrobat 11

    I do not have the option to print separations from Acrobat Pro 11 on OSX Yosemite. I have installed the PPDs and they work in Illustrator and InDesign but do not work in Acrobat.
    First, I am a designer at a screen printing shop and have been printing separations on a daily basis for 3 years. I understand how it works. I was working on a PC with CS 5.5. Typical workflow was to design in Illustrator, Print to PDF, open the PDF in Acrobat, save as EPS. EPS was the preferred method since I print the transparencies from Illustrator, and since Illustrator can only open one page of a PDF at a time, I saved the PDF as EPS so that ever spot color got it’s own EPS file. From there, I created a new AI file, put all EPS files on different art boards and printed.
    Now I am on a Mac with Yosemite and CC 2014. I know the PDF workflow changed in Snow Leopard. You now have to print to a PostScript file and Distill, which then gives me the PDF i can open w Acrobat and save to EPS as usual.
    But, I decided to really dig into Acrobat 11 since it has all the Ink Manager and Preflight features. My preferred workflow would be creation in AI, save a PDF, then use all of Acrobats features for the final check and separations. The Acrobat manual says on page 316:
    “Print separations
    1. Choose File > Print, and choose a printer.
    2. Choose an option from the Comments and Forms menu.
    3. Choose print range and page handling options.
    4. Click Advanced.
    5. If you created a custom printer settings file with the appropriate separation settings, choose it from the Settings menu at the top of the
    Advanced Print Setup dialog box.
    6. Select Output on the left, and choose an option from the Color menu:
    Choose Separations if the PPD doesn’t support in-RIP separations.
    12. Click PostScript Options on the left, and select settings as needed. Click OK to close the dialog box, and then click OK again to print the separations.”
    The only option I have in the print dialog is my desktop printer.
    I have installed the PPDs, which brings me to another problem.
    On this forum
    https://forums.adobe.com/message/6735474#6735474
    the gives the link
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=141
    which is the adobe.sit.hqx file that contains 5 files with no file extension. Per the “Read Me” instructions, I have placed the “Acrobat Distiller (no file extension)” file in the
    Library/Printers: PPDs: Contents: Resources: folder.
    It works with Illustrator, and is not really and issue.
    -The file is a 17KB file with no extension that was last modified on 9/9/2001.
    Following another page
    http://helpx.adobe.com/x-productkb/multi/save-as-pdf-options-not.html#main_InstallAcroPPD
    it give the link
    Acrobat 9 PPD
    which is the ADPDF9.PPD file, a 29 KB PPD file last modified on 12/8/2014.
    Just to test it out, I placed both files in the
    Library/Printers: PPDs: Contents: Resources: folder. Both are selectable from Illustrator when printing a PostScript file and both seem to work. I see no real difference between them.
    I also created the PPDs file in the Presets folder of InDesign and can get separations from there as well.
    But, I do not have the PostScript or any other print option from the Acrobat print dialog except for my desktop printer.
    SO,
    1) Is there somewhere else I need to place the PPDs for Acrobat to see it? The manual states I should be able to print the separations from the Print Dialog but its not available.
    2) What is the difference between the “Acrobat Distiller” file and the “ADPDF9.PPD” files? Different size, different dates, but no obvious difference in output.
    3) I sometimes print halftone jobs through AccuRip. I have gotten pretty good at manual spot color transparency gradients within illustrator, where I create complex gradients using only a spot color and a gradient with 100% transparency on one end and 0% on the other. But if I have many colors in it, I have to print separations through PotsScript and then Distill it, which flattens all transparency on the separated file. The result is a separation with a placed image gradient with a clipping mask instead of a true vector gradient. I know it has to be flattened when it’s ripped anyway, but I would like for it to ONLY get flattened as it passed through the rip on its way to the transparency, and not during the Distiller separation which then is placed back in AI for printing. Is there any way to do this on a Mac which MUST be printed to PostScript and Distilled?
    Thanks

    “I’ll never give you a job to print.”
    Lead with an insult, good start.
    You know, I read your comment, and the link, right before I went to bed. I thought I would respond then, but thought I should sleep on it. Well I slept on it, and I’m actually MORE p***ed off today than  last night. I will try to keep this as professional as possible…
    “Such an outdated time consuming workflow !!!”
    No S**t (so much for professional). Which is why it’s unfortunate that Apple forced this workflow on people like me.
    I asked SPECIFICALLY about color SEPARATIONS in the title of the post and throughout the post. The link you provided did not provide an answer to this. It explained how terrible “refrying” a PDF can be. And what was the solution it gave?
    “Use EPS and not PostScript!”
    Strange. it seems that is the EXACT workflow I listed! To quote myself;
    “Typical workflow was to design in Illustrator, Print to PDF, open the PDF in Acrobat, save as EPS”
    That was on a PC, where Print to PDF is still an option. The design is made in Illustrator with Spot Colors, all overprints are set, because a human will be lining up the screens to print by hand, and you need about .5 - 1 point of “play” for when the screen moves so abutting colors will not have a gap of shirt color between them. I can then use all of the functionality of the AI print dialog box and print the SEPARATIONS to a PDF file, and the PDF is then split to separate EPS files for easier control.
    Apple in it’s infinite wisdom has taken away this functionality. From AI, my 2 listed printers are my desktop printer and an Adobe PostScript file. Remember, I am SEPARATING the artwork to be printed on vellums that will be used to burn a screen. If I leave my desktop printer active, I can select “Setup”, where i am brought to the system print dialog box, where if I select “Adobe PDF” or “Save as PDF”, I get the message from Illustrator that “The Save as PDF option in the Printer dialog box are not supported”.
    So, if I change the Printer to “Adobe Postscript file”, the “Setup” box is greyed out. If I simple  “Save As” and choose PDF, I do not have the option to SEPARATE colors. Do you see the dilemma now? Apple remove the functionality I have on a PC, so my SEPARATIONS can not be saved directly to a PDF, but MUST me “printed” to a Post Script file, which then MUST be distilled to get a PDF of SEPARATIONS.
    Which brings me back to the whole point of my post.
    ““Such an outdated time consuming workflow !!!”
    Right, which is why I’m trying to avoid it. In reality, the entire process only involves 1 extra step over the PC workflow, and the Distill process literally takes a few seconds. But, I don’t want to Distill for all the reasons listed in the link you provided. And if i follow the advice of the link, saving to EPS, I DO NOT have the option of SEPARATIONS. Which is why I’m trying to save a PDF from AI, the use all the functionality of Acrobat Pro to SEPARATE my colors. Again, the manual to Acrobat says I can print my SEPARATIONS to a file, but I only have the option to print to my desktop printer from the Acrobat Print Dialog box, even though I have DO have other options in AI and InDesign.
    So, great Adobe MVP, can you answer my original questions?
    1- why do I not have the option to print to a file in Acrobat Pro?
    2- What is the difference between the “Acrobat Distiller” file and the “ADPDF9.PPD” files? Different size, different dates, but no obvious difference in output. (Not what I want to use, but on OSX post 10.6, I don’t really have a choice it seems)
    3- Is there any way to print to a SEPARATION file on a Mac without printing to PostScript and then being Distilled?
    I see your skills are:
    “PDF forms, PDF multimedia, eBooks in PDF or in ePub format.
    I'm an InDesign Digital Publishing Suite specialist too. I am also a trainer and the webmaster of abracadabraPDF.net, the only French web site dedicated to PDF and Acrobat.”
    Good for you. Have you EVER had to print separations for a t-shirt? Have you ever had to consider that a person will be physically pushing the ink through a screen, so you must consider the thickness of the ink, how that will interact with the mesh of the screen, which determines the LPI the halftones are printed at, which determines how fine your gradients should be? Because I do it everyday. So your whole “I’ll never give you a job” thing is especially infuriating, and pretty unprofessional.
    So not only have you totally ignored all my questions, you insulted me and given me a link that ALSO answers none of my questions. I am also assuming, though I could be wrong, that you marked your answer as correct int he AcrobatUsers forums. Well guess what? Even with you MVP badge, you are NOT correct. At least not for what I’m asking.
    If I ever need an eBook, PDF form, ePub or Multimedia PDF done, maybe I’ll use you. But, I would never hire you for color separations for t-shirt printing.

  • Rotate camera function

    Hello,
    I'm starting to write a code for Acrobat and 3d Objects.
    What I need is a function that rotates an object given a yaw and a pitch (i.e. rotateObjectYaw(45) to rotate the object 45 degrees around, rotating the camera, not the object itself).
    I started modifying the CameraRotate.js and I already made it work eliminating the friction effect and performing the full delta change in one iteration.
    Yaw works perfectly, but the problem is the pitch. If I rotate the Yaw first, the pitch does not rotate around the changed axis but on the original pitch axis. I guess the problem lies somewhere around:
            // Update camera direction
            var x = Math.sin( yaw   ) * Math.cos( pitch );
            var y = Math.cos( yaw   ) * Math.cos( pitch );
            var z = Math.sin( pitch );
            cameraDirection.set( x, y, z );
            // Update camera position
            trueCameraPos.set(targetPosition);
            trueCameraPos.addScaledInPlace(cameraDirection, cameraDistance * GlobalZoomScale);
            camera.up.set(targetPosition.x, targetPosition.y, targetPosition.z + cameraDistance);
            camera.position.set(trueCameraPos);
            camera.targetPosition.set(targetPosition);
    But I'm not sure, and I have no idea about vector space calculations and so. Can somebody help me out?

    Mike,
    Can you put this in the Rich Media & 3D forum: http://forums.adobe.com/community/acrobat/acrobat_3d_features

  • Images Issue when saving an illustrator file as pdf

    Hi,
    I have been suffering these couple of days with the pdfs I save from my illustrator CS5 multi page file. It is a brochure that I designed using many images that I adjusted in Photoshop to CMYK & 300 dpi & embedded in ai. I used some drop shadows for some images & have some transparent vectors & gradient fills in the pages.
    The pdfs I save open very normally on my pc, but the issues appear for the client. He gets some images missing in some pages (the ones that got the gradient transparency). The pages also tend not to load completely & stay blurred. He also got the “drawing error” message.
    I tried to make sure all color modes are the same_ used the US web coated SWOP (default)
    He still gets missing images!
    The same file I sent to a friend of mine, it opened normally! but informed me that Adobe considers the file with “special features”.
    I had to export the pages to jepgs so that he gets to see the design.
    I tried to flatten the gradient transparent vectors but also used the downsampling for the images when saving the pdf & used the “Zip” for compression to reduce the size… what did he get??? no images at all in all the pages.
    I started seeing pdf nighmares last night :S really.
    Please help :’(
    Thanks

    We all have Acrobat Professional reader 7.0.
    I guess he has Windows but tried to open the file from his ipad too.

  • 3d Graphics (no Java3D)

    I was just wondering how many are there that are doing "un-javalike" programming? What I mean is 3d graphics, gaming, generally anything that is more suitable for something like C++. I'm especially interested in java 3d engines and demo effects. I don't want any code or help, I just wish to know what you have done and if it there has been difficulties with some issues.

    hi jsalonen
    Cool thing. I noticed you set the statusbar text every nanosecond. just comment out that line, and see if it gets any smoother.
    My little flight simulator is something I did a few years ago (my way of studying math). Ist just an applet with some calls to g.setColor() and g.fillPolygon() in the paint method. Did it all from scratch using pure awt and mathemathics.
    My tequnique is to use matrix transformations between the different coordinate systems, (model, world, view and screen coordinates) sort all the polyhedrons (insertion sort is the fastest sort algorithm) and paint all polygons that is "facing towards the camra". I also did some vector angel calculations to set the light on every polygon acording to the angel between the surface of the polygon and the direction of the light.
    Tryed to make a new version, but I have a problem with the transformation from view cordinates to screen coordinates. (I am just deviding on the z value) but that only works if the z value of all the verices of the polyhedron are positive (i.e. the entire polyhedron is in front of you) if half of the polyheron is behind you I have a problem...
    Regards
    "3d
    Ragnvald

  • Scale 9 Grid Question

    Aren't the 8 "outer" areas in a scale9 gride supposed to remain the same size independent of the scale?  And the inner section is only supposed to scale?  Flash CS4 definitely doesn't do it this way, but I always thought that's how scale9 slices are supposed to function, so that your edges, and corners always look beautified.

    BUT, you can sidestep this by using the Combine Objects > Union tool on the vector gradient areas in the "outer" slices.  Thanks for the help !

  • Flash Player 11 will also mean enhanced Vector Drawing & Gradient performance?

    I'm wondering if in order to benefit of the GPUs power we will be forced to use Stage3D.
    Will old games also feel better in Flash Player 11? Does Flash Player 11 accelerate old 2D drawing code by passing traditional gradient & vector calculations to the GPU?

    Ouch. Sorry, thanks for the tip! There are so many Forums (but they are well categorized) I kinda missed that one ::- D.
    Done!
    http://forums.adobe.com/thread/905556

  • Can i save a vector with gradient mesh as isolated .PNG?

    Hi,
    Can i save a vector with gradient mesh as isolated .PNG?
    It has some effects, so if i'm taking it out from the blue background it becomes darker.
    Any advice? I need it isolated png for using it in an iOS app.
    Many thanks

    I am using Illustrator CS6, on Mac.
    I can't copy and paste the "cloud" into a new document to save it, because it looses the effect of those filters (since the background is no longer behind it).
    Sorry if im not explaining it right, i'm a beginner in illustrator.  Can i group both the "cloud" and the blue background, to get just one shape: the realistic white cloud?
    P.S: i can make a link with the .esp file of the clouds, if it helps.

  • Downsaving to version 10 rasterizes my gradients. How do I downsave and keep everything vector?

    I am trying to downsave my Illustrator work to version 10 AND keep all the shapes vector. I do a save copy and select the version of Illustrator I need (10), the result gives me rasterized images rather than vector for many of the gradient filled shapes. What do I do to make sure everything stays vector?
    Diane

    I'm using the most current CC version. It's not a drop shadow issue, its a gradient issue. I have gradients stacked on gradients and they contain transparency.
    I can save down to CS4, but once I try to save as CS3, the gradient rasterize.

  • Converting a gradient from a spot color to a process build, hides vector elements

    I have been using Illustrator for many years and consider myself very familiar with it, but recently ran into a strange issue I have never seen before.
    The background element is a radial gradient with points of 0% to 50% of a spot color. The file came to me as one single layer, with the gradient in question above a vector rectangle. The rectangle shows up fine, however, until I convert the gradient from a spot to a process build at which point the box is no longer visible. The initial issue I found was that the box is beneath the gradient, but my question is why would it be visible as long as the gradient uses a spot and then disappear behind it when converted to a process build?

    Version is CS5.
    Part of what made the issue so confusing is that there are no effects applied. Applying the overprint feature or multiply effect don't effect the outcome either. It's only something that can be fixed by moving the gradient to a layer behind the element which is disappearing. My question is less about how to fix it (I've done that and moved on) and more about why this would happen - it seems to be a strange anomoly.
    In response to the replies involving the method of color conversion:
    I have used all of the methods mentioned and the end result is the same. It is starting to look to me like this is a fluke that happened with this particular file and that it is not something that can be duplicated intentionally.

  • Gradient fill disappearing when converting vector/Illustrator file to shape layer

    Hi,
    When coverting a vector or Illustrator file (such as a logo) into a shape layer any gradient fill is lost. Is there no way to ensure the gradient fill is converted across or is this a matter for a future release of After Effects?
    Many thanks.

    That's a limitation of the current feature.
    If you want a different behavior, you can submit a feature request here: http://www.adobe.com/go/wish

  • [svn] 4394: Adding last changes and comments on behalf of Kaushal for his radial and linear gradient transform calculations .

    Revision: 4394
    Author: [email protected]
    Date: 2009-01-05 13:13:51 -0800 (Mon, 05 Jan 2009)
    Log Message:
    Adding last changes and comments on behalf of Kaushal for his radial and linear gradient transform calculations.
    QE: Not yet.
    Doc: No
    Checkintests: Pass
    Modified Paths:
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/swf/AbstractFXGGraphics.java
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/swf/TypeHelper.java

    After posting I and lots of research I realized that I need to dive into
    PaperVision 3D as way to get where I need to go.
    However, if anyone has a solution to adding text to this code which rotates with the cube - let me know.
    Thanks

  • Illustrator CC: trouble adding gradient inner glow for states on a vector map

    I'm trying to figure out how to make gradient borders for countries on a vector map in Illustrator. I'm aiming for something like this: but with the gradient borders being more pronounced, a stronger gradient for borders. Can this be done in Illustrator and what would be the correct effect to use?
    I tried using the Stylize Inner Glow effect but the problem is that I get this result:
    Not sure why this occurs, but the any layer I apply an inner glow to suddenly looks blocky or no longer smooth:
    Thanks very much in advance for any help with this.

    Check your Document Raster Effects and probably set to 300 ppi. Easiest way is to use Object>Path>Offset path with a negative number. Then Object>Expand and set the fill for the lightest version of the color. Then make a blend between the two versions of the path.

  • Vector file is missing elements and gradients in artwork at the printer

    My gradients are getting lost when I send to printing company. When I flatten and save as .eps the quality is poor. The scale of the artwork is 1:10. I'd love to send a vector file so it can scale up, but like I said, the gradient and some drop shadows and other portions of the artwork are disappearing. I'm using Illustrator CC.

    It is vinyl printing. They are using a program called Vinyl Express (version 8). It's for a vehicle wrap.
    My design has transparency. There are several paths overlapping containing gradients.
    The printer asked me to flatten the artwork and save it as a .eps. I was hoping to submit artwork that is 1/10 to scale. Today I made it as large as I can in illustrator and then opened the file in photoshop. But then I realized at the size I was working in the artwork couldn't be saved as a photoshop .eps. The option was to save it as a large document format. I ended up doing a tiff. There are so many options in the saving process it's got me uncertain how to it just right.
    I would really like to submit a vector file so the scaling is limitless, but they are asking for it flattened. Scaling it up from 1/10 isn't working because it is pixelated. What would be the best approach for flattening? I tried the flatten transparency option, but there are so many options... I'm wondering if it would be necessary to use the preset, "Complex art." And should I do 0 on the raster/vector scale?

  • Gradient to a shape/keep "Stylize" effects as vector

    I drawing a phone in Illustrator and I'm trying to make an iPad-like bezel. I have two options for achieving a darker area on the edges of the bezel:
    1: Use inner glow, but I want it to export to SVG as a vector effect and not linked/embedded image.
    2: Gradient along the inside of the bezel that matches its curvature, which I don't know how to do.
    A solution to make either option work as I said is what I'm looking for. Either or.

    Especially with things intended for the web, keep the number of elements to a minimum. In Blends, be sure to use Specify Steps and don't go nuts with the number of steps. The sample shown contains only 6 paths in the bezel.
    SVG supports grad fills. Realize, you can blend between grad fills. For optimum results, make sure the blended paths have the same number of anchorPoints, and the same number of color stops in their grads.
    When done, look at the resulting SVG code and see how complex it is.
    but I want it to export to SVG as a vector effect
    Illustrator includes a few SVG filters. Realize: just because it's an SVG effect doesn't necessarily mean it's vector, just as in Illustrator not all effects that can be applied to vector paths are vector effects. Personally, for SVG graphics, I would use a program more directly dedicated to SVG. Inkscape, for example.
    JET

Maybe you are looking for

  • Scanning - Letter size paper transfers to Legal Size in PDF

    When I scan letter size paper via Adobe it is saved as a legal size.  I've uninstalled and reinstalled the printer drivers.  How do I change the PDF paper to letter size?

  • Problem with DSM-CC

    Hi! I'm working with Xlet to build an application that i would mount in a STB and specifically i'm writing some rows of code about DSM-CC but i don't know if it's right. I would want update a file called Box.txt (in my directory File) that i change f

  • JSF - CommandLink action - Partial Refresh for Multiple Pages in a Form

    Hi, I have a 3 JSP Pages, say ( 1.jsp, 2.jsp, 3.jsp) called as designed in the FORM below : --------------PAGE 1.jsp----------------------------------------- | Input Box 1 | | Input Box 2 | | Input Box 3 | | | | <DIV> | | PAGE 2.JSP | | </DIV> | | |

  • Standard text display in sap script

    Hi Experts, The standard text will be stored in Name = ORDCONF_TEXT_(sales org)_(distributionchannel)_(division) Text ID = ZSD Examples: ORDCONF_TEXT_4000_01_01 , ORDCONF_TEXT_4000_01_80 , ORDCONF_TEXT_1000_01_01. Requirement : The print program /for

  • I have a Mac os x 10.7.5, i can't download anything at all.

    I have a Mac os x 10.7.5, i can't download anything. I deleted unused files, emptied trash. Restart, googled. Still, nothing works. I tried downloading Adobe Acrobat Reader free new version. Contacted Adobe, they can't help with free version apps. He